H.J. Lu
b7761f1106
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.
2012-01-31 17:54:39 +00:00
Alan Modra
edc83535ee
daily update
2012-01-30 23:00:06 +00:00
Alan Modra
4d9625af3e
daily update
2012-01-29 23:00:05 +00:00
Alan Modra
ab7ffd808f
daily update
2012-01-28 23:00:05 +00:00
Alan Modra
690834b28c
daily update
2012-01-27 23:00:06 +00:00
Michael Eager
0d048da385
* bfd/elf32-microblaze.c (create_got_section):
...
Reuse existing .rela.got section.
2012-01-27 16:47:27 +00:00
Alan Modra
3c064588bb
daily update
2012-01-26 23:00:04 +00:00
Alan Modra
c9479f0745
daily update
2012-01-25 23:00:06 +00:00
Alan Modra
f237609d94
daily update
2012-01-24 23:00:06 +00:00
Alan Modra
42bc6e0f95
daily update
2012-01-24 01:22:37 +00:00
Alan Modra
9f296da34f
* 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.
2012-01-23 06:16:38 +00:00
Alan Modra
9cd76556c3
daily update
2012-01-22 23:00:05 +00:00
Alan Modra
9886336bcf
daily update
2012-01-21 23:00:05 +00:00
Alan Modra
9fc0f57088
daily update
2012-01-20 23:00:05 +00:00
Nick Clifton
f1bb16f888
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.
2012-01-20 14:42:57 +00:00
Ulrich Weigand
1f20dca58b
* 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.
2012-01-20 09:52:43 +00:00
Alan Modra
3e83742a65
daily update
2012-01-19 23:00:07 +00:00
Tristan Gingold
100fc76795
2012-01-19 Tristan Gingold <gingold@adacore.com>
...
* pef.c: Add a comment.
* xsym.c: Likewise.
2012-01-19 11:45:36 +00:00
Alan Modra
868e0b4d84
daily update
2012-01-18 23:00:05 +00:00
Alan Modra
89ee7288fe
daily update
2012-01-17 23:00:05 +00:00
Alan Modra
6aa2bb2b1b
daily update
2012-01-16 23:00:05 +00:00
Alan Modra
75cd47ede2
* 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.
2012-01-16 22:30:19 +00:00
Alan Modra
8a5dcf532e
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.
2012-01-16 08:30:18 +00:00
Alan Modra
70abf05b38
daily update
2012-01-15 23:00:06 +00:00
Alan Modra
f326dd16d6
daily update
2012-01-14 23:00:06 +00:00
Alan Modra
99ac642055
daily update
2012-01-13 23:00:11 +00:00
Iain Sandoe
687be931eb
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.
2012-01-13 12:59:30 +00:00
Iain Sandoe
bb76d9401e
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.
2012-01-13 12:08:23 +00:00
Alan Modra
4be111d2a0
daily update
2012-01-12 23:00:05 +00:00
Iain Sandoe
50d10658ee
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.
2012-01-12 14:03:12 +00:00
Alan Modra
da737a1679
daily update
2012-01-11 23:00:05 +00:00
Iain Sandoe
e5081f2f8f
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.
2012-01-11 15:24:10 +00:00
Iain Sandoe
bbd561712c
bfd:
...
* mach-o.c (bfd_mach_o_build_commands): Make the building of each
command type independent.
2012-01-11 15:06:36 +00:00
Alan Modra
794e51c094
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.
2012-01-11 09:28:45 +00:00
Alan Modra
6a94ddad87
daily update
2012-01-10 23:00:05 +00:00
H.J. Lu
df4f944355
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.
2012-01-10 20:18:18 +00:00
Tristan Gingold
2a65a88eea
2012-01-10 Tristan Gingold <gingold@adacore.com>
...
* mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
warning.
2012-01-10 11:59:28 +00:00
Tristan Gingold
660722b0e2
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.
2012-01-10 11:51:09 +00:00
Alan Modra
f6a7d9b8fc
daily update
2012-01-09 23:00:05 +00:00
Iain Sandoe
b22161d698
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.
2012-01-09 10:47:50 +00:00
Alan Modra
61405183f3
daily update
2012-01-08 23:00:06 +00:00
Alan Modra
a6cbf2b94a
daily update
2012-01-07 23:00:06 +00:00
Alan Modra
6e3571fce8
daily update
2012-01-06 23:00:06 +00:00
Nick Clifton
28a1b4f812
PR binutils/13121
...
* reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
'flaginfo' to avoid conflicts with AIX system headers.
2012-01-06 15:44:30 +00:00
Tristan Gingold
36f0a48f6c
2012-01-06 Tristan Gingold <gingold@adacore.com>
...
* bfdio.c (bfd_bread): Use arelt_size macro.
2012-01-06 11:43:51 +00:00
Tristan Gingold
76d4c1cb5c
2012-01-06 Tristan Gingold <gingold@adacore.com>
...
* config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
2012-01-06 11:41:28 +00:00
Alan Modra
e1c67baeca
daily update
2012-01-05 23:00:06 +00:00
Nick Clifton
23e1d3291c
Rotate ChangeLogs
2012-01-05 10:09:39 +00:00
Nick Clifton
a1c7aafba7
PR ld/12161
...
* elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
necessary.
2012-01-05 09:57:18 +00:00
Jan Kratochvil
e85c6a7015
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.
2012-01-05 07:50:44 +00:00