binutils.git
12 years agoSupport arch-dependent fill
H.J. Lu [Tue, 31 Jan 2012 17:54:30 +0000 (31 17:54 +0000)]
Support arch-dependent fill

bfd/

2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13616
* archures.c (bfd_arch_info): Add fill.
(bfd_default_arch_struct): Add bfd_arch_default_fill.
(bfd_arch_default_fill): New.

* configure.in: Set bfd version to 2.22.52.
* configure: Regenerated.

* cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
initializer.
* cpu-arc.c: Likewise.
* cpu-arm.c: Likewise.
* cpu-avr.c: Likewise.
* cpu-bfin.c: Likewise.
* cpu-cr16.c: Likewise.
* cpu-cr16c.c: Likewise.
* cpu-cris.c: Likewise.
* cpu-crx.c: Likewise.
* cpu-d10v.c: Likewise.
* cpu-d30v.c: Likewise.
* cpu-dlx.c: Likewise.
* cpu-epiphany.c: Likewise.
* cpu-fr30.c: Likewise.
* cpu-frv.c: Likewise.
* cpu-h8300.c: Likewise.
* cpu-h8500.c: Likewise.
* cpu-hppa.c: Likewise.
* cpu-i370.c: Likewise.
* cpu-i860.c: Likewise.
* cpu-i960.c: Likewise.
* cpu-ia64.c: Likewise.
* cpu-ip2k.c: Likewise.
* cpu-iq2000.c: Likewise.
* cpu-lm32.c: Likewise.
* cpu-m10200.c: Likewise.
* cpu-m10300.c: Likewise.
* cpu-m32c.c: Likewise.
* cpu-m32r.c: Likewise.
* cpu-m68hc11.c: Likewise.
* cpu-m68hc12.c: Likewise.
* cpu-m68k.c: Likewise.
* cpu-m88k.c: Likewise.
* cpu-mcore.c: Likewise.
* cpu-mep.c: Likewise.
* cpu-microblaze.c: Likewise.
* cpu-mips.c: Likewise.
* cpu-mmix.c: Likewise.
* cpu-moxie.c: Likewise.
* cpu-msp430.c: Likewise.
* cpu-mt.c: Likewise.
* cpu-ns32k.c: Likewise.
* cpu-openrisc.c: Likewise.
* cpu-or32.c: Likewise.
* cpu-pdp11.c: Likewise.
* cpu-pj.c: Likewise.
* cpu-plugin.c: Likewise.
* cpu-powerpc.c: Likewise.
* cpu-rl78.c: Likewise.
* cpu-rs6000.c: Likewise.
* cpu-rx.c: Likewise.
* cpu-s390.c: Likewise.
* cpu-score.c: Likewise.
* cpu-sh.c: Likewise.
* cpu-sparc.c: Likewise.
* cpu-spu.c: Likewise.
* cpu-tic30.c: Likewise.
* cpu-tic4x.c: Likewise.
* cpu-tic54x.c: Likewise.
* cpu-tic6x.c: Likewise.
* cpu-tic80.c: Likewise.
* cpu-tilegx.c: Likewise.
* cpu-tilepro.c: Likewise.
* cpu-v850.c: Likewise.
* cpu-vax.c: Likewise.
* cpu-w65.c: Likewise.
* cpu-we32k.c: Likewise.
* cpu-xc16x.c: Likewise.
* cpu-xstormy16.c: Likewise.
* cpu-xtensa.c: Likewise.
* cpu-z80.c: Likewise.
* cpu-z8k.c: Likewise.

* cpu-i386.c: Include "libiberty.h".
(bfd_arch_i386_fill): New.
Add bfd_arch_i386_fill to  bfd_arch_info initializer.

* cpu-k1om.c: Add bfd_arch_i386_fill to  bfd_arch_info initializer.
* cpu-l1om.c: Likewise.

* linker.c (default_data_link_order): Call abfd->arch_info->fill
if fill size is 0.

* bfd-in2.h: Regenerated.

include/

2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13616
* bfdlink.h (bfd_link_order): Update comments on data size.

ld/

2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13616
* emulparams/elf32_x86_64.sh: Remove NOP.
* emulparams/elf_i386.sh: Likewise.
* emulparams/elf_i386_be.sh: Likewise.
* emulparams/elf_i386_ldso.sh: Likewise.
* emulparams/elf_i386_vxworks.sh: Likewise.
* emulparams/elf_k1om.sh: Likewise.
* emulparams/elf_l1om.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.

* ldlang.c (zero_fill): Initialized to 0.

* ldwrite.c (build_link_order): Set data size to linker odrder
size when they are the same.

* scripttempl/elf.sc: Don't specify fill if NOP is undefined.

ld/testsuite/

2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13616
* ld-i386/tlsbindesc.dd: Update no-op padding.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlspic.dd: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlsbindesc.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.

12 years ago2012-01-31 Paul Brook <paul@codesourcery.com>
Paul Brook [Tue, 31 Jan 2012 15:01:55 +0000 (31 15:01 +0000)]
2012-01-31  Paul Brook  <paul@codesourcery.com>

gas/
* doc/c-tic6x.c: Fix typo.

12 years ago* rl78-decode.opc (rl78_decode_opcode): Add NOT1.
DJ Delorie [Tue, 31 Jan 2012 00:22:52 +0000 (31 00:22 +0000)]
* rl78-decode.opc (rl78_decode_opcode): Add NOT1.
* rl78-decode.c: Regenerate.

* config/rl78-parse.y (NOT1): Add.

12 years agodaily update
Alan Modra [Mon, 30 Jan 2012 23:00:06 +0000 (30 23:00 +0000)]
daily update

12 years agoCheck if -fpic -mtls-dialect=gnu2 works
H.J. Lu [Mon, 30 Jan 2012 21:13:28 +0000 (30 21:13 +0000)]
Check if -fpic -mtls-dialect=gnu2 works

2012-01-30  H.J. Lu  <hongjiu.lu@intel.com>

* configure.ac: Check if -fpic -mtls-dialect=gnu2 works.
* configure: Regenerated.

12 years agodaily update
Alan Modra [Sun, 29 Jan 2012 23:00:05 +0000 (29 23:00 +0000)]
daily update

12 years agodaily update
Alan Modra [Sat, 28 Jan 2012 23:00:05 +0000 (28 23:00 +0000)]
daily update

12 years ago * reloc.h (Bits): New class with static functions, copied from
Ian Lance Taylor [Sat, 28 Jan 2012 01:47:01 +0000 (28 01:47 +0000)]
* reloc.h (Bits): New class with static functions, copied from
namespace utils in arm.cc.
* arm.cc (namespace utils): Remove.  Rewrite all uses to use Bits
instead.

12 years agoUpdate copyright year.
Ian Lance Taylor [Sat, 28 Jan 2012 01:43:58 +0000 (28 01:43 +0000)]
Update copyright year.

12 years ago * mips.h: New file
Ian Lance Taylor [Sat, 28 Jan 2012 01:04:22 +0000 (28 01:04 +0000)]
* mips.h: New file
* elfcpp.h (SHT_MIPS_REGINFO): New enums for processor-specific flags.
(SHF_MIPS_GPREL): Likewise.
(PT_MIPS_REGINFO, PT_MIPS_RTPROC, PT_MIPS_OPTIONS): Likewise.
(DT_MIPS_RLD_VERSION, DT_MIPS_TIME_STAMP, DT_MIPS_ICHECKSUM,
 DT_MIPS_IVERSION, DT_MIPS_FLAGS, DT_MIPS_BASE_ADDRESS, DT_MIPS_MSYM,
 DT_MIPS_CONFLICT, DT_MIPS_LIBLIST, DT_MIPS_LOCAL_GOTNO,
 DT_MIPS_CONFLICTNO, DT_MIPS_LIBLISTNO, DT_MIPS_SYMTABNO,
 DT_MIPS_UNREFEXTNO, DT_MIPS_GOTSYM, DT_MIPS_HIPAGENO, DT_MIPS_RLD_MAP,
 DT_MIPS_DELTA_CLASS, DT_MIPS_DELTA_CLASS_NO, DT_MIPS_DELTA_INSTANCE,
 DT_MIPS_DELTA_INSTANCE_NO, DT_MIPS_DELTA_RELOC, DT_MIPS_DELTA_RELOC_NO,
 DT_MIPS_DELTA_SYM, DT_MIPS_DELTA_SYM_NO, DT_MIPS_DELTA_CLASSSYM,
 DT_MIPS_DELTA_CLASSSYM_NO, DT_MIPS_CXX_FLAGS, DT_MIPS_PIXIE_INIT,
 DT_MIPS_SYMBOL_LIB, DT_MIPS_LOCALPAGE_GOTIDX, DT_MIPS_LOCAL_GOTIDX,
 DT_MIPS_HIDDEN_GOTIDX, DT_MIPS_PROTECTED_GOTIDX, DT_MIPS_OPTIONS,
 DT_MIPS_INTERFACE, DT_MIPS_DYNSTR_ALIGN, DT_MIPS_INTERFACE_SIZE,
 DT_MIPS_RLD_TEXT_RESOLVE_ADDR, DT_MIPS_PERF_SUFFIX,
 DT_MIPS_COMPACT_SIZE, DT_MIPS_GP_VALUE, DT_MIPS_AUX_DYNAMIC,
 DT_MIPS_PLTGOT, DT_MIPS_RWPLT): Likewise.

12 years ago * elfcpp.h (STT_GNU_IFUNC): Add comment.
Ian Lance Taylor [Sat, 28 Jan 2012 00:59:27 +0000 (28 00:59 +0000)]
* elfcpp.h (STT_GNU_IFUNC): Add comment.

12 years agoCorrect incremental relocation offset
H.J. Lu [Sat, 28 Jan 2012 00:23:30 +0000 (28 00:23 +0000)]
Correct incremental relocation offset

2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>

* incremental.cc (write_info_blocks): Correct relocation offset.

12 years agoSupport x32 GD->IE and GD->LE optimizations
H.J. Lu [Fri, 27 Jan 2012 23:29:54 +0000 (27 23:29 +0000)]
Support x32 GD->IE and GD->LE optimizations

2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>

* x86_64.cc (Relocate::tls_gd_to_ie): Support x32.
(Relocate::tls_gd_to_le): Likewise.

12 years agoSupport x32 IFUNC function pointer
H.J. Lu [Fri, 27 Jan 2012 23:26:54 +0000 (27 23:26 +0000)]
Support x32 IFUNC function pointer

2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>

* x86_64.cc (Scan::global): Support x32 IFUNC function pointer.

12 years agoCheck if -mcmodel=medium works
H.J. Lu [Fri, 27 Jan 2012 23:23:37 +0000 (27 23:23 +0000)]
Check if -mcmodel=medium works

2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>

* configure.ac: Check if -mcmodel=medium works.
* configure: Regenerated.

12 years agodaily update
Alan Modra [Fri, 27 Jan 2012 23:00:06 +0000 (27 23:00 +0000)]
daily update

12 years ago * bfd/elf32-microblaze.c (create_got_section):
Michael Eager [Fri, 27 Jan 2012 16:47:26 +0000 (27 16:47 +0000)]
* bfd/elf32-microblaze.c (create_got_section):
Reuse existing .rela.got section.

12 years agodaily update
Alan Modra [Thu, 26 Jan 2012 23:00:04 +0000 (26 23:00 +0000)]
daily update

12 years ago * dwarf2.h (enum dwarf_form): Add Fission extensions.
Cary Coutant [Thu, 26 Jan 2012 22:57:17 +0000 (26 22:57 +0000)]
* dwarf2.h (enum dwarf_form): Add Fission extensions.
(enum dwarf_attribute): Likewise.

12 years ago PR gas/13624
Nick Clifton [Thu, 26 Jan 2012 14:56:49 +0000 (26 14:56 +0000)]
PR gas/13624
* app.c (app_push): Set 'add_newlines' to zero after saving.

12 years ago * make-relative-prefix.c (make_relative_prefix_1): Avoid warning
Jakub Jelinek [Thu, 26 Jan 2012 14:28:30 +0000 (26 14:28 +0000)]
* make-relative-prefix.c (make_relative_prefix_1): Avoid warning
about using preprocessor directives inside of macro arguments.

12 years ago PR binutils/13622
Nick Clifton [Thu, 26 Jan 2012 09:59:30 +0000 (26 09:59 +0000)]
PR binutils/13622
* readelf.c (process_section_groups): If there are no section
headers do not scan for section groups.
(process_note_sections): Likewise for note sections.

12 years agodaily update
Alan Modra [Wed, 25 Jan 2012 23:00:06 +0000 (25 23:00 +0000)]
daily update

12 years ago * int_encoding.cc (read_unsigned_LEB_128): Replaced with inline
Cary Coutant [Wed, 25 Jan 2012 07:34:54 +0000 (25 07:34 +0000)]
* int_encoding.cc (read_unsigned_LEB_128): Replaced with inline
definition and ...
(read_unsigned_LEB_128_x): ... this new function.
(read_signed_LEB_128): Replaced with inline definition and ...
(read_signed_LEB_128_x): ... this new function.
* int_encoding.h  (read_unsigned_LEB_128_x): New function.
(read_unsigned_LEB_128): Add inline definition.
(read_signed_LEB_128_x): New function.
(read_signed_LEB_128): Add inline definition.
* testsuite/Makefile.am (leb128_unittest): New unit test.
* testsuite/Makefile.in: Regenerate.
* testsuite/leb128_unittest.cc: New unit test.

12 years ago* rl78-decode.opc (rl78_decode_opcode): Add NOT1.
DJ Delorie [Wed, 25 Jan 2012 01:40:09 +0000 (25 01:40 +0000)]
* rl78-decode.opc (rl78_decode_opcode): Add NOT1.
* rl78-decode.c: Regenerate.

* config/rl78-parse.y (NOT1): Add.

12 years agodaily update
Alan Modra [Tue, 24 Jan 2012 23:00:06 +0000 (24 23:00 +0000)]
daily update

12 years agoUse my google.com address.
Ian Lance Taylor [Tue, 24 Jan 2012 06:21:47 +0000 (24 06:21 +0000)]
Use my google.com address.

12 years ago PR gold/13617
Ian Lance Taylor [Tue, 24 Jan 2012 06:21:11 +0000 (24 06:21 +0000)]
PR gold/13617
* i386.cc (Target_i386::do_code_fill): When using a jmp
instruction, pad with nop instructions.
* x86_64.cc (Target_x86_64::do_code_fill): Likewise.

12 years agodaily update
Alan Modra [Tue, 24 Jan 2012 01:22:37 +0000 (24 01:22 +0000)]
daily update

12 years ago* configure.tgt (i386-*-nacl*): Match it.
Roland McGrath [Mon, 23 Jan 2012 21:42:03 +0000 (23 21:42 +0000)]
* configure.tgt (i386-*-nacl*): Match it.
* config/te-nacl.h: New file.
* config/tc-i386.h [TE_NACL] (ELF_TARGET_FORMAT): Define for this case.
* config/tc-i386.c [TE_NACL] (i386_comment_chars, PREFIX_SEPARATOR):
Use TE_GNU et al case for TE_NACL too.

12 years agomerge from gcc
DJ Delorie [Mon, 23 Jan 2012 07:01:21 +0000 (23 07:01 +0000)]
merge from gcc

12 years ago * elf-bfd.h: Formatting.
Alan Modra [Mon, 23 Jan 2012 06:16:33 +0000 (23 06:16 +0000)]
* elf-bfd.h: Formatting.
(struct elf_backend_data): Add "maybe_function_sym".
(_bfd_elf_maybe_function_sym): Declare.
* elfxx-target.h (elf_backend_maybe_function_sym): Define.
(elfNN_bed): Init new field.
* elf.c (elf_find_function): Use maybe_function_sym.
(_bfd_elf_maybe_function_sym): New function.
* elf64-ppc.c (elf_backend_maybe_function_sym): Define.
(ppc64_elf_maybe_function_sym): New function.

12 years agodaily update
Alan Modra [Sun, 22 Jan 2012 23:00:05 +0000 (22 23:00 +0000)]
daily update

12 years agodaily update
Alan Modra [Sat, 21 Jan 2012 23:00:05 +0000 (21 23:00 +0000)]
daily update

12 years agodaily update
Alan Modra [Fri, 20 Jan 2012 23:00:05 +0000 (20 23:00 +0000)]
daily update

12 years agoAdd .d8 suffix support to x86 assembler
H.J. Lu [Fri, 20 Jan 2012 20:53:49 +0000 (20 20:53 +0000)]
Add .d8 suffix support to x86 assembler

gas/

2012-01-20  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (_i386_insn): Replace disp32_encoding with
disp_encoding.
(md_assemble): Updated.
(output_branch): Likewise.
(parse_insn): Support .d8 suffix.
(build_modrm_byte): Fake zero displacement for .d8 and .d32
suffixes.

* doc/c-i386.texi: Document .d8 suffix.

gas/testsuite/

2012-01-20  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/disp32.s: Add tests for .d8 suffix.
* gas/i386/x86-64-disp32.s: Likewise.

* gas/i386/disp32.d: Updated.
* gas/i386/x86-64-disp32.d: Likewise.

12 years ago PR binutils/13534
Nick Clifton [Fri, 20 Jan 2012 14:42:56 +0000 (20 14:42 +0000)]
PR binutils/13534
* archive.c (_bfd_ar_sizepad): New function. Correctly install and
pad the size field in an archive header.
(_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
function for the archive size field.
(bfd_generic_openr_next_archived_file): Likewise.
(do_slurp_coff_armap): Likewise.
(_bfd_write_archive_contents): Likewise.
(_bfd_bsd44_write_ar_hdr): Use the new function.
(bfd_ar_hdr_from_filesystem): Likewise.
(_bfd_write_archive_contents): Likewise.
(bsd_write_armap): Likewise.
(coff_write_armap): Likewise.
* archive64.c (bfd_elf64_archive_write_armap): Likewise.
* bfdio.c (bfd_bread): Use correct type for archive element
sizes.
* ar.c (open_inarch): Likewise.
(extract_file): Likewise.
* libbfd-in.h (struct areltdata): Use correct types for
parsed_size and extra_size fields.
Prototype _bfd_ar_sizepad function.
* libbfd.h: Regenerate.

12 years ago2012-01-20 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 20 Jan 2012 10:40:52 +0000 (20 10:40 +0000)]
2012-01-20  Tristan Gingold  <gingold@adacore.com>

* od-macho.c (OPT_SEG_SPLIT_INFO): New macro.
(options): Add an entry for seg_split_info.
(mach_o_help): Document it.
(dump_segment_split_info): New function.
(dump_load_command): Handle seg_split_info.

12 years ago * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
Ulrich Weigand [Fri, 20 Jan 2012 09:52:43 +0000 (20 09:52 +0000)]
* elf.c (elfcore_write_prpsinfo): Provide unconditionally.
Return NULL if core file generation is unsupported.
(elfcore_write_prstatus): Likewise.
* elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
(elf_backend_write_core_note): Define.

12 years agoAdd typename on types used in template
H.J. Lu [Fri, 20 Jan 2012 00:43:56 +0000 (20 00:43 +0000)]
Add typename on types used in template

2012-01-22  H.J. Lu  <hongjiu.lu@intel.com>

* x86_64.cc (gc_process_relocs): Add typename on types used in
template.
(scan_relocs): Likewise.
(relocate_section): Likewise.
(apply_relocation): Likewise.

12 years agodaily update
Alan Modra [Thu, 19 Jan 2012 23:00:07 +0000 (19 23:00 +0000)]
daily update

12 years ago2012-01-19 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Thu, 19 Jan 2012 13:58:15 +0000 (19 13:58 +0000)]
2012-01-19  Tristan Gingold  <gingold@adacore.com>

* dwarf.c (process_extended_line_op): Add a cast to silent a
warning.

12 years ago2012-01-19 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Thu, 19 Jan 2012 11:45:35 +0000 (19 11:45 +0000)]
2012-01-19  Tristan Gingold  <gingold@adacore.com>

* pef.c: Add a comment.
* xsym.c: Likewise.

12 years ago2012-01-19 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Thu, 19 Jan 2012 11:34:44 +0000 (19 11:34 +0000)]
2012-01-19  Tristan Gingold  <gingold@adacore.com>

* dwarf.c (process_extended_line_op): Reindent define_file output.
Detect define_file opcode length mismatch.
(display_debug_lines_decoded): Add an entry in file_table for each
define_file opcode.
Ignore DW_LNE_set_discriminator and DW_LNE_HP_set_sequence.
Display extended opcode for unhandle opcode.

12 years agodaily update
Alan Modra [Wed, 18 Jan 2012 23:00:05 +0000 (18 23:00 +0000)]
daily update

12 years agodaily update
Alan Modra [Tue, 17 Jan 2012 23:00:05 +0000 (17 23:00 +0000)]
daily update

12 years ago * write.c (fix_new_internal): Don't mark used parameter as unused.
Alan Modra [Tue, 17 Jan 2012 00:20:29 +0000 (17 00:20 +0000)]
* write.c (fix_new_internal): Don't mark used parameter as unused.

12 years ago * config/default.exp: Provide tmpdir/ld/collect-ld.
Alan Modra [Tue, 17 Jan 2012 00:16:53 +0000 (17 00:16 +0000)]
* config/default.exp: Provide tmpdir/ld/collect-ld.

12 years agoUpdate copyright message year.
Alan Modra [Tue, 17 Jan 2012 00:07:01 +0000 (17 00:07 +0000)]
Update copyright message year.

12 years ago PR binutils/10173
Alan Modra [Mon, 16 Jan 2012 23:51:35 +0000 (16 23:51 +0000)]
PR binutils/10173
* cr16-dis.c (print_arg): Test symtab_size not num_symbols.

12 years ago* gas/testsuite/gas/m68k/pmove.s, gas/testsuite/gas/m68k/pmove.d: New test.
Andreas Schwab [Mon, 16 Jan 2012 23:19:20 +0000 (16 23:19 +0000)]
* gas/testsuite/gas/m68k/pmove.s, gas/testsuite/gas/m68k/pmove.d: New test.
* gas/testsuite/gas/m68k/all.exp: Run it.

* opcodes/m68k-opc.c (m68k_opcodes): Fix entries for pmove with BADx/BACx
register and move them after pmove with PSR/PCSR register.

12 years agodaily update
Alan Modra [Mon, 16 Jan 2012 23:00:05 +0000 (16 23:00 +0000)]
daily update

12 years ago * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
Alan Modra [Mon, 16 Jan 2012 22:30:19 +0000 (16 22:30 +0000)]
* elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
trailing garbage in the note.
* elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.

12 years ago PR binutils/13593
Alan Modra [Mon, 16 Jan 2012 08:43:20 +0000 (16 08:43 +0000)]
PR binutils/13593
* nm.c (OPTION_SIZE_SORT): Define.
(long_options): Don't set no_sort, sort_numerically or
sort_by_size directly.
(main): Instead set the flags here, making them mutually exclusive.

12 years ago PR ld/13491
Alan Modra [Mon, 16 Jan 2012 08:30:09 +0000 (16 08:30 +0000)]
PR ld/13491
* coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
h->root.type not h->type.
* coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.

12 years agodaily update
Alan Modra [Sun, 15 Jan 2012 23:00:06 +0000 (15 23:00 +0000)]
daily update

12 years ago PR ld/12758
Alan Modra [Sun, 15 Jan 2012 01:57:14 +0000 (15 01:57 +0000)]
PR ld/12758
* ldlang.c (lang_process): Don't reopen all files, just those
newly added by plugin.

12 years agodaily update
Alan Modra [Sat, 14 Jan 2012 23:00:06 +0000 (14 23:00 +0000)]
daily update

12 years agodaily update
Alan Modra [Fri, 13 Jan 2012 23:00:11 +0000 (13 23:00 +0000)]
daily update

12 years agoAdd vmfunc
H.J. Lu [Fri, 13 Jan 2012 22:19:27 +0000 (13 22:19 +0000)]
Add vmfunc

gas/

2012-01-13  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (cpu_arch): Add ".vmfunc".

* doc/c-i386.texi: Document vmfunc.

gas/testsuite/

2012-01-13  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/i386.exp: Run vmfunc and x86-64-vmfunc.

* gas/i386/vmfunc.d: New.
* gas/i386/vmfunc.s: Likewise.
* gas/i386/x86-64-vmfunc.d: Likewise.

opcodes/

2012-01-13  H.J. Lu  <hongjiu.lu@intel.com>

* i386-dis.c (mod_table): Add vmfunc.

* i386-gen.c (cpu_flag_init): Add CPU_VMFUNC_FLAGS.
(cpu_flags): CpuVMFUNC.

* i386-opc.h (CpuVMFUNC): New.
(i386_cpu_flags): Add cpuvmfunc.

* i386-opc.tbl: Add vmfunc.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.

12 years agoreverse the order of relocs in mach-o gas output.
iains [Fri, 13 Jan 2012 15:19:06 +0000 (13 15:19 +0000)]
reverse the order of relocs in mach-o gas output.

gas:

* config/obj-macho.c (obj_mach_o_reorder_section_relocs): New.
* config/obj-macho.h (SET_SECTION_RELOCS): Define.
(obj_mach_o_reorder_section_relocs): Declare.

gas/testsuite:

* gas/all/redef2.d: Skip for Darwin.
* gas/all/redef3.d: Likewise.
* gas/all/weakref1.d: Likewise.
* gas/macros/irp.d: Likewise.
* gas/macros/repeat.d: Likewise.
* gas/macros/rept.d: Likewise.
* gas/macros/test2.d: Likewise.
* gas/macros/vararg.d: Likewise.
* gas/mach-o/macro-irp.d: New.
* gas/mach-o/macro-repeat.d: New.
* gas/mach-o/macro-rept.d: New.
* gas/mach-o/macro-test2.d: New.
* gas/mach-o/macro-vararg.d: New.
* gas/mach-o/redef2.d: New.
* gas/mach-o/redef3.d: New.

12 years agohandle absolute indirect syms in mach-o
iains [Fri, 13 Jan 2012 12:59:29 +0000 (13 12:59 +0000)]
handle absolute indirect syms in mach-o

bfd:

* mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
indirect symbols.
gas:

* config/obj-macho.c (obj_mach_o_set_indirect_symbols): Handle
absolute indirect symbols.

gas/testsuite:

* gas/mach-o/dysymtab-3.d: New.
* gas/mach-o/symbols-7.s: New.

12 years agoorder relocs after segments for mach-o
iains [Fri, 13 Jan 2012 12:08:22 +0000 (13 12:08 +0000)]
order relocs after segments for mach-o

bfd:

* mach-o.c (bfd_mach_o_write_relocs): Move compuation of relocs file
position from here... to (bfd_mach_o_build_seg_command): Here.

12 years agoset vma on mach-o sections.
iains [Fri, 13 Jan 2012 11:55:01 +0000 (13 11:55 +0000)]
set vma on mach-o sections.

gas:

* config/obj-macho.c (obj_mach_o_set_vma_data): New type.
(obj_mach_o_set_section_vma): New.
(obj_mach_o_post_relax_hook): New.
* config/obj-macho.h (md_post_relax_hook): Define.
(obj_mach_o_post_relax_hook): Declare.

gas/testsuite:

* gas/mach-o/dysymtab-2.d: Update to include the set VMA.
* gas/mach-o/symbols-1-64.d: Likewise.
* gas/mach-o/symbols-1.d: Likewise.
* gas/mach-o/symbols-6.d: Likewise.
* gas/mach-o/zerofill-1.d: Likewise.
* gas/mach-o/zerofill-2.d: Likewise.

12 years agodaily update
Alan Modra [Thu, 12 Jan 2012 23:00:05 +0000 (12 23:00 +0000)]
daily update

12 years agoadd indirect_symbol to mach-o port.
iains [Thu, 12 Jan 2012 14:03:05 +0000 (12 14:03 +0000)]
add indirect_symbol to mach-o port.

bfd:

* mach-o.c (bfd_mach_o_count_indirect_symbols): New.
(bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
* mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
file. (bfd_mach_o_section): Add indirect_syms field.

gas:

* config/obj-macho.c (obj_mach_o_set_symbol_qualifier): Switch off
lazy when the symbol is private_extern.
(obj_mach_o_indirect_sym): New type.
(obj_mach_o_indirect_symbol): New.
(mach_o_pseudo_table): Use obj_mach_o_indirect_symbol.
(obj_macho_frob_label): Adjust to avoid adding bsyms for locals.
(obj_macho_frob_label): Likewise.  Adjust external and comm
symbol tests.
(obj_mach_o_set_indirect_symbols): New.
(obj_mach_o_frob_file_after_relocs): New.
*config/obj-macho.h (obj_frob_file_after_relocs): Define.
(obj_mach_o_frob_file_after_relocs): Declare.

include/mach-o:

* loader.h (BFD_MACH_O_INDIRECT_SYM_LOCAL): New.
(BFD_MACH_O_INDIRECT_SYM_ABS): New

gas/testsuite:

* gas/mach-o/dysymtab-2.d: New.
* gas/mach-o/err-syms-4.s: New.
* gas/mach-o/err-syms-5.s: New.
* gas/mach-o/err-syms-6.s: New.
* gas/mach-o/symbols-6-64.d: New.
* gas/mach-o/symbols-6-64.s: New.
* gas/mach-o/symbols-6.d: New.
* gas/mach-o/symbols-6.s: New.

12 years ago2012-01-12 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Thu, 12 Jan 2012 08:53:34 +0000 (12 08:53 +0000)]
2012-01-12  Tristan Gingold  <gingold@adacore.com>

PR gas/13591
* config/obj-coff.h (sy_obj): Rename macro to avoid a name conflict.

12 years agodaily update
Alan Modra [Wed, 11 Jan 2012 23:00:05 +0000 (11 23:00 +0000)]
daily update

12 years agobfd:
iains [Wed, 11 Jan 2012 15:24:09 +0000 (11 15:24 +0000)]
bfd:

* mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
vmsize from filesize.  Don't compute offsets or file sizes for
zerofill sections.

12 years agobfd:
iains [Wed, 11 Jan 2012 15:06:34 +0000 (11 15:06 +0000)]
bfd:

* mach-o.c (bfd_mach_o_build_commands): Make the building of each
command type independent.

12 years agobfd/
Alan Modra [Wed, 11 Jan 2012 09:28:44 +0000 (11 09:28 +0000)]
bfd/
* elf64-ppc.c: Define more insns used in plt call stubs.
(ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
(ppc64_elf_relocate_section): Likewise.
(enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
(struct ppc_link_hash_table): Increase size of stub_count array.
Add plt_stub_align and plt_thread_safe.
(ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
(plt_stub_size, plt_stub_pad): New functions.
(build_plt_stub): Emit barriers for power7 thread safety.  Don't
emit needless save of r2.
(build_tls_get_addr_stub): Adjust params.
(ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
plt stubs.  Adjust build_*plt_stub calls.
(ppc_size_one_stub): Similarly.
(ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
params.  Choose default for plt_thread_safe based on existence of
calls to thread creation functions.  Modify plt_call to
plt_call_r2save when no tocsave reloc found.  Align tail of stub
sections.
(ppc64_elf_build_stubs): Align tail of stub sections.  Adjust
output of stub statistics.
(ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
* elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
ld/
* emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE,
PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and
--{no-,}plt-align.
(plt_thread_safe, plt_stub_align): New vars.
(gld${EMULATION_NAME}_after_allocation): Pass them to
ppc64_elf_size_stubs.  Align stub sections according to plt_stub_align.
* ld.texinfo: Document new command line options, and an old
undocumented option.

12 years agodaily update
Alan Modra [Tue, 10 Jan 2012 23:00:05 +0000 (10 23:00 +0000)]
daily update

12 years agoProperly handle R_X86_64_32 for x32
H.J. Lu [Tue, 10 Jan 2012 20:58:35 +0000 (10 20:58 +0000)]
Properly handle R_X86_64_32 for x32

2012-01-10  H.J. Lu  <hongjiu.lu@intel.com>

* x86_64.cc (Scan::check_non_pic): Allow R_X86_64_32 for x32.
(Scan::local): Use R_X86_64_RELATIVE relocation for R_X86_64_32
under x32.

12 years agoRemove ABI_64_P check on R_X86_64_PCXX
H.J. Lu [Tue, 10 Jan 2012 20:18:14 +0000 (10 20:18 +0000)]
Remove ABI_64_P check on R_X86_64_PCXX

bfd/

2012-01-10  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13581
* elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
check on R_X86_64_PCXX.

ld/testsuite/

2012-01-10  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13581
* ld-x86-64/ilp32-4.s: New.
* ld-x86-64/ilp32-10.d: Likewise.
* ld-x86-64/ilp32-10.s: Likewise.

* ld-x86-64/ilp32-4.d: Adjusted.
* ld-x86-64/ilp32-5.d: Likewise.
* ld-x86-64/ilp32-5.s: Likewise.

* ld-x86-64/x86-64.exp: Run ilp32-10.

12 years agomerge from gcc
DJ Delorie [Tue, 10 Jan 2012 18:15:31 +0000 (10 18:15 +0000)]
merge from gcc

12 years ago2012-01-10 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 10 Jan 2012 11:59:28 +0000 (10 11:59 +0000)]
2012-01-10  Tristan Gingold  <gingold@adacore.com>

* mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
warning.

12 years ago2012-01-10 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 10 Jan 2012 11:52:27 +0000 (10 11:52 +0000)]
2012-01-10  Tristan Gingold  <gingold@adacore.com>

* objdump.c (display_object_bfd): Renamed from ...
(display_bfd): ... this.
(display_any_bfd): New function.
(display_file): Split.  Handle nested archives.

12 years ago2012-01-10 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 10 Jan 2012 11:51:08 +0000 (10 11:51 +0000)]
2012-01-10  Tristan Gingold  <gingold@adacore.com>

* bfdio.c (bfd_tell): Handle nested archives.
(bfd_seek): Ditto.
* cache.c (bfd_cache_lookup_worker): Ditto.
* archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
nested archives.
(bfd_generic_openr_next_archived_file): Likewise.

12 years ago2012-01-10 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 10 Jan 2012 11:48:26 +0000 (10 11:48 +0000)]
2012-01-10  Tristan Gingold  <gingold@adacore.com>

* struc-symbol.h (struct symbol_flags): New struct, created from...
(struct symbol): ... this one.  Add sy_flags field, remove flag fields.
(struct local_symbol): Replace lsy_marker field by lsy_flags.
Adjust comment.
(local_symbol_resolved_p): Adjust.
(local_symbol_mark_resolved): Likewise.
* symbols.c (LOCAL_SYMBOL_CHECK): Adjust.
(local_symbol_make, local_symbol_convert, colon)
(symbol_clone_if_forward_ref, verify_symbol_chain)
(resolve_symbol_value, snapshot_symbol, S_GET_VALUE)
(S_IS_WEAKREFR, S_IS_WEAKREFD, S_IS_VOLATILE, S_IS_FORWARD_REF)
(S_SET_WEAKREFR, S_CLEAR_WEAKREFR, S_SET_WEAKREFD)
(S_CLEAR_WEAKREFD, S_SET_VOLATILE, S_CLEAR_VOLATILE)
(S_SET_FORWARD_REF, symbol_same_p, symbol_mark_used)
(symbol_clear_used, symbol_used_p, symbol_mark_used_in_reloc)
(symbol_clear_used_in_reloc, symbol_used_in_reloc_p)
(symbol_mark_mri_common, symbol_clear_mri_common)
(symbol_mri_common_p, symbol_mark_written, symbol_clear_written)
(symbol_written_p, symbol_mark_resolved, symbol_resolved_p)
(symbol_equated_reloc_p, dot_symbol_init)
(print_symbol_value_1): Adjust.

12 years agobinutils/
Roland McGrath [Tue, 10 Jan 2012 00:02:44 +0000 (10 00:02 +0000)]
binutils/
* configure.in: Use AM_ZLIB.
* configure: Regenerated.

ld/
* configure.in: Use AM_ZLIB.
* configure: Regenerated.

12 years agodaily update
Alan Modra [Mon, 9 Jan 2012 23:00:05 +0000 (9 23:00 +0000)]
daily update

12 years agoInitial x32 support in gold
H.J. Lu [Mon, 9 Jan 2012 17:42:34 +0000 (9 17:42 +0000)]
Initial x32 support in gold

2012-01-09  H.J. Lu  <hongjiu.lu@intel.com>

* x86_64.cc: Initial support for x32.

12 years agoadd symbol qualifiers for mach-o to bfd/gas
iains [Mon, 9 Jan 2012 10:47:45 +0000 (9 10:47 +0000)]
add symbol qualifiers for mach-o to bfd/gas

bfd:

* mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
(bfd_mach_o_write_symtab): Remove handling for indirect syms.
(bfd_mach_o_primary_symbol_sort_key): Likewise.
(bfd_mach_o_cf_symbols): Likewise.
(bfd_mach_o_sort_symbol_table): Remove.
(bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
for indirect and dysymtab counts.  Do the symbol sorting here.
(bfd_mach_o_build_dysymtab_command): Count the symbol types here.
Make the indirect symbols a TODO.
(bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
(bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
a non-zero value.
(bfd_mach_o_read_symtab_symbol): Record the symbol index.
(bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
* mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
(IS_MACHO_INDIRECT): Remove.
(SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.

gas:

* config/obj-macho.c (obj_mach_o_weak): Remove.
(obj_mach_o_common_parse): Set symbol qualifiers.
(LAZY, REFE): New macros.
(obj_mach_o_symbol_type): New enum.
(obj_mach_o_set_symbol_qualifier): New.
(obj_mach_o_sym_qual): New.
(mach_o_pseudo_table): Add symbol qualifiers, set indirect_symbol to
a dummy function.
(obj_mach_o_type_for_symbol): New.
(obj_macho_frob_label): New.
(obj_macho_frob_symbol): New.
* config/obj-macho.h (S_SET_ALIGN): Amend temorary var name.
(obj_frob_label, obj_macho_frob_label): Declare.
(obj_frob_symbol, obj_macho_frob_symbol): Declare.

gas/testsuite:

* gas/mach-o/err-syms-1.s: New.
* gas/mach-o/err-syms-2.s: New.
* gas/mach-o/err-syms-3.s: New.
* gas/mach-o/symbols-2.d: New.
* gas/mach-o/symbols-2.s: New.
* gas/mach-o/symbols-3.s: New.
* gas/mach-o/symbols-4.s: New.
* gas/mach-o/symbols-5.d: New.
* gas/mach-o/symbols-5.s: New.

12 years agodaily update
Alan Modra [Sun, 8 Jan 2012 23:00:06 +0000 (8 23:00 +0000)]
daily update

12 years agogas/
Richard Sandiford [Sun, 8 Jan 2012 12:33:53 +0000 (8 12:33 +0000)]
gas/
* config/tc-mips.c (s_tls_rel_directive): Call mips_clear_insn_labels.

gas/testsuite/
* gas/mips/tls-relw.s, gas/mips/tls-relw.d: New test.
* gas/mips/mips.exp: Run it.

12 years agogas/
Richard Sandiford [Sun, 8 Jan 2012 12:11:39 +0000 (8 12:11 +0000)]
gas/
2011-01-08  Andrew Pinski  <andrew.pinski@caviumnetworks.com>
    Richard Sandiford  <rdsandiford@googlemail.com>

* config/tc-mips.c (mips_move_labels): Take the list of labels and
textness as parameters.
(mips_move_text_labels): New function.
(append_insn): Use it instead of mips_move_labels.
(mips_emit_delays, start_noreorder): Likewise.
(mips_align): Take the labels rather than just one label.
Move all labels to after the .align.
(s_align): Change the last argument to mips_align.
(s_cons): Likewise.
(s_float_cons): Likewise.
(s_gpword): Likewise.
(s_gpdword): Likewise.

gas/testsuite/
* gas/mips/align3.s, gas/mips/align3.d: New testcase.
* gas/mips/mips.exp: Run it.

12 years agodaily update
Alan Modra [Sat, 7 Jan 2012 23:00:06 +0000 (7 23:00 +0000)]
daily update

12 years agomerge from gcc
Jason Merrill [Sat, 7 Jan 2012 02:53:16 +0000 (7 02:53 +0000)]
merge from gcc

12 years agodaily update
Alan Modra [Fri, 6 Jan 2012 23:00:06 +0000 (6 23:00 +0000)]
daily update

12 years agomerge from gcc
DJ Delorie [Fri, 6 Jan 2012 22:04:39 +0000 (6 22:04 +0000)]
merge from gcc

12 years ago2012-01-06 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 6 Jan 2012 16:23:38 +0000 (6 16:23 +0000)]
2012-01-06  Tristan Gingold  <gingold@adacore.com>

* config/tc-i386.c: Update copyright year.
(lex_got): Also defined for Mach-O.
Add a guard for non-ELF configuration.
(md_longopts): Also handle -64 for Mach-O.
(md_parse_option): Likewise.
(i386_target_format): Adjust for x86_64-darwin.

12 years ago PR binutils/13121
Nick Clifton [Fri, 6 Jan 2012 15:44:28 +0000 (6 15:44 +0000)]
PR binutils/13121
* reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
'flaginfo' to avoid conflicts with AIX system headers.

12 years ago2012-01-06 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 6 Jan 2012 11:43:50 +0000 (6 11:43 +0000)]
2012-01-06  Tristan Gingold  <gingold@adacore.com>

* bfdio.c (bfd_bread): Use arelt_size macro.

12 years ago2012-01-06 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 6 Jan 2012 11:41:27 +0000 (6 11:41 +0000)]
2012-01-06  Tristan Gingold  <gingold@adacore.com>

* config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.

12 years ago * po/ru.po: Updated Russian translation.
Nick Clifton [Fri, 6 Jan 2012 10:29:56 +0000 (6 10:29 +0000)]
* po/ru.po: Updated Russian translation.

12 years agodaily update
Alan Modra [Thu, 5 Jan 2012 23:00:06 +0000 (5 23:00 +0000)]
daily update

12 years ago * ld-x86-64/x86-64.exp: Add test of linking mixed 32-bit and
Nick Clifton [Thu, 5 Jan 2012 15:17:17 +0000 (5 15:17 +0000)]
* ld-x86-64/x86-64.exp: Add test of linking mixed 32-bit and
64-bit objects when the 32-bit object (loaded first) contains 32+
local symbols, all referenced by relocs and the 64-bit object
contains a reloc that uses a symbol in the 32-bit object.
* 32bit.s: New source file.
* 64bit.s: New source file.
* incompatible.l: New expected linker output file.

12 years agoRotate ChangeLogs
Nick Clifton [Thu, 5 Jan 2012 10:09:33 +0000 (5 10:09 +0000)]
Rotate ChangeLogs

12 years ago PR ld/12161
Nick Clifton [Thu, 5 Jan 2012 09:57:18 +0000 (5 09:57 +0000)]
PR ld/12161
* elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
necessary.

12 years agobfd/
Jan Kratochvil [Thu, 5 Jan 2012 07:50:43 +0000 (5 07:50 +0000)]
bfd/
Fix zero registers core files when built by gcc-4.7.
* elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
size.  Call elfcore_write_note for the local variables.  Remove the
final elfcore_write_note call.  Add NOTREACHED comments.