aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2002-10-01daily updateAlan Modra1-1/+1
2002-09-30[include/elf]Richard Sandiford5-6/+81
* mips.h (E_MIPS_MACH_4120, E_MIPS_MACH_5400, E_MIPS_MACH_5500): New. [bfd/] * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New. (bfd_mach_mips5500): New. * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New. (arch_info_struct): Add corresponding entries here. * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120, E_MIPS_MACH_5400 and E_MIPS_MACH_5500. (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120, bfd_mach_mips5400 and bfd_mach_mips5500. (_bfd_mips_elf_mach_extends_p): New function. (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge the EF_MIPS_MACH flags. * bfd-in2.h: Regenerate.
2002-09-30daily updateAlan Modra1-1/+1
2002-09-29daily updateAlan Modra1-1/+1
2002-09-28* elf32-vax.c (elf_vax_size_dynamic_section): Don't stripJason Thorpe2-10/+6
.got sections.
2002-09-28 * elf.c (map_sections_to_segments): Correct test for start ofAlan Modra2-2/+8
writable section in the same page as end of read-only section.
2002-09-28daily updateAlan Modra1-1/+1
2002-09-27* elf32-vax.c (elf_vax_check_relocs): Remove unusedJason Thorpe2-72/+104
local_got_refcounts usage. Remove allocation of got slot. (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage. Remove de-allocation of got slot. (elf_vax_size_dynamic_section): Fix some indentation. Add hash traversal for elf_vax_instantiate_got_entries. Allow empty .got sections to be GC'ed. (elf_vax_instantiate_got_entries): New function. (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove tests that are now handled by elf_vax_instantiate_got_entries. Assert GOT entry falls within .got section size. Remove redundant comparisions. Fix comments.
2002-09-27bfd/Jakub Jelinek6-49/+693
* reloc.c: Add x86-64 TLS relocs. * bfd-in2.h, libbfd.h: Rebuilt. * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit relocs. Add TLS relocs. (x86_64_reloc_map): Add TLS relocs. (elf64_x86_64_info_to_howto): Adjust for added TLS relocs. (struct elf64_x86_64_link_hash_entry): Add tls_type field. (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define. (elf64_x86_64_hash_entry): Define. (struct elf64_x86_64_obj_tdata): New. (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define. (struct elf64_x86_64_link_hash_table): Add tls_ld_got. (link_hash_newfunc): Initialize tls_type. (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got. (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary. (elf64_x86_64_mkobject): New. (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata. (elf64_x86_64_tls_transition): New. (elf64_x86_64_check_relocs): Add r_type variable and use it. Handle TLS relocs. (elf64_x86_64_gc_sweep_hook): Handle TLS relocs. (allocate_dynrelocs): Allocate GOT space for TLS relocs. (elf64_x86_64_size_dynamic_sections): Likewise. (dtpoff_base, tpoff): New. (elf64_x86_64_relocate_section): Handle TLS relocs. (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT entries. (bfd_elf64_mkobject): Define. * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set DF_STATIC_TLS if shared. gas/ * config/tc-i386.c (tc_i386_fix_adjustable): Add x86-64 TLS relocs. Define them if not BFD_ASSEMBLER. (lex_got): Handle @tlsgd, @dtpoff and @tpoff in 64-bit mode, add @tlsld. (md_apply_fix3): No addend for BFD_RELOC_X86_64_TLSGD, BFD_RELOC_X86_64_TLSLD and BFD_RELOC_X86_64_GOTTPOFF. (tc_gen_reloc): Handle x86-64 TLS relocs. include/ * elf/x86-64.h: Add TLS relocs. ld/testsuite/ * lib/ld-lib.exp (run_ld_link_tests): Add. * ld-sh/sh64/sh64.exp (run_ld_link_tests, regexp_diff, file_contents): Remove. (sh64tests): Add 6th field to the tests array. * ld-i386/i386.exp (run_ld_link_tests): Remove. * ld-x86-64/x86-64.exp: New. * ld-x86-64/tlsbin.dd: New test. * ld-x86-64/tlsbinpic.s: New test. * ld-x86-64/tlsbin.rd: New test. * ld-x86-64/tlsbin.s: New test. * ld-x86-64/tlsbin.sd: New test. * ld-x86-64/tlsbin.td: New test. * ld-x86-64/tlslib.s: New test. * ld-x86-64/tlspic1.s: New test. * ld-x86-64/tlspic2.s: New test. * ld-x86-64/tlspic.dd: New test. * ld-x86-64/tlspic.rd: New test. * ld-x86-64/tlspic.sd: New test. * ld-x86-64/tlspic.td: New test.
2002-09-27daily updateAlan Modra1-1/+1
2002-09-26 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneededThiemo Seufer2-1/+6
empty relocation sections.
2002-09-26 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.Alan Modra2-26/+29
(ppc64_elf_build_stubs): Build them here instead.
2002-09-26daily updateAlan Modra1-1/+1
2002-09-25daily updateAlan Modra1-1/+1
2002-09-24 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVEJakub Jelinek3-6/+23
addend into r_addend, not *r_offset. (elf32_sparc_finish_dynamic_symbol): Likewise. * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at R_SPARC_RELATIVE's r_offset.
2002-09-24Fix typo introduced with previous delta.Nick Clifton1-2/+1
2002-09-24daily updateAlan Modra1-1/+1
2002-09-23Add missing ChangeLog entryDaniel Jacobowitz1-1/+5
2002-09-23Update to correctly decode (non-standard DWARF2) out-of-order address sequences.Nick Clifton2-63/+67
2002-09-23* config.bfd: For DJGPP targets, match with any cpu and any machine.DJ Delorie2-1/+5
2002-09-23 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocsAlan Modra3-2/+13
for discarded FDEs. Remove redundant assignment. * elflink.h (elf_bfd_discard_info): Save edited relocs.
2002-09-23daily updateAlan Modra1-1/+1
2002-09-222002-09-22 H.J. Lu <hjl@gnu.org>H.J. Lu2-1/+6
* elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge the relocation count between different .reloc sections.
2002-09-22daily updateAlan Modra1-1/+1
2002-09-21 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" andAlan Modra2-6/+17
".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and R_PPC_EMB_RELSDA.
2002-09-21 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"Alan Modra6-30/+64
unsigned. Move "symcount" assignment out of loop. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regnerate.
2002-09-21daily updateAlan Modra1-1/+1
2002-09-20(_bfd_dwarf2_find_nearest_line): If address length is zero, set it to 8 forNick Clifton2-0/+13
(non-standard) 64-bit DWARF2 formats (e.g. IRIX64).
2002-09-202002-09-19 Jakub Jelinek <jakub@redhat.com>H.J. Lu2-8/+23
* elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word even if generating R_PPC_RELATIVE reloc. (ppc_elf_relocate_section): Make sure relocation is performed if skip == -2. Clear memory at r_offset when creating dynamic relocation.
2002-09-20daily updateAlan Modra1-1/+1
2002-09-19bfd/Jakub Jelinek5-75/+334
* reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Add. * bfd-in2.h, libbfd.h: Rebuilt. * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE and R_386_TLS_GOTIE. (elf_i386_reloc_type_lookup): Handle it. (struct elf_i386_link_hash_entry): Change tls_type type to unsigned char instead of enum, change GOT_* into defines. (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define. (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE. (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is accessed both as normal and TLS symbol. Move R_386_TLS_LDM and R_386_PLT32 cases so that R_386_TLS_IE can fall through. Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE. Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if tls_type is GOT_TLS_IE_BOTH. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE. Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch all 4 GOT_TLS_* TLS types. gas/ * config/tc-i386.c (tc_i386_fix_adjustable): Handle BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE. (BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Define to 0 if not defined. (lex_got): Handle @GOTNTPOFF and @INDNTPOFF. (md_apply_fix3, tc_gen_reloc): Handle BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE. gas/testsuite/ * gas/i386/tlspic.s: Add tests. * gas/i386/tlspic.d: Regenerated. * gas/i386/tlsnopic.s: Add tests. * gas/i386/tlsnopic.d: Regenerated. include/ * elf/i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE): Define. ld/testsuite/ * ld-i386/i386.exp: New. * ld-i386/tlsbin.dd: New test. * ld-i386/tlsbinpic.s: New test. * ld-i386/tlsbin.rd: New test. * ld-i386/tlsbin.s: New test. * ld-i386/tlsbin.sd: New test. * ld-i386/tlsbin.td: New test. * ld-i386/tlslib.s: New test. * ld-i386/tlsnopic1.s: New test. * ld-i386/tlsnopic2.s: New test. * ld-i386/tlsnopic.dd: New test. * ld-i386/tlsnopic.rd: New test. * ld-i386/tlsnopic.sd: New test. * ld-i386/tlspic1.s: New test. * ld-i386/tlspic2.s: New test. * ld-i386/tlspic.dd: New test. * ld-i386/tlspic.rd: New test. * ld-i386/tlspic.sd: New test. * ld-i386/tlspic.td: New test.
2002-09-19When examining weak symbols, follow indirect links.Nick Clifton2-1/+9
2002-09-19Fix error reading ECOFF information: 'ioptMax' refers to the actual *size*Nick Clifton2-1/+6
of the optimization symtab, not the number of entries.
2002-09-19Update to correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)Nick Clifton2-104/+140
2002-09-19(elf32_arm_adjust_dynamic_symbol): Update ELF_LINK_HASH_NEEDS_PLT logic.Nick Clifton2-6/+17
2002-09-19Fix the ChangeLog entry for my last commit.Jakub Jelinek1-1/+2
2002-09-19daily updateAlan Modra1-1/+1
2002-09-18* elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.Stan Cox1-2/+2
2002-09-18 * elfcode.h (elf_slurp_reloc_table_from_section): CheckDaniel Jacobowitz2-1/+12
correct relocation count.
2002-09-18 * bfd-in.h (bfd_get_dynamic_symcount): Define.Daniel Jacobowitz6-2/+32
* bfd.c (struct _bfd): Add dynsymcount. * bfd-in2.h: Regenerated. * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set abfd->dynsymcount. * elfcode.h (elf_slurp_reloc_table_from_section): Check for overflow.
2002-09-18 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.Stan Cox4-4/+17
(mips_elf64_final_gp): Don't make up gp value. * elfn32-mips.c (mips_elf_final_gp): Likewise. * elfxx-mips.c (_bfd_mips_elf_final_link): Always create .MIPS.options/.options section.
2002-09-18daily updateAlan Modra1-1/+1
2002-09-172002-09-17 David O'Brien <obrien@FreeBSD.org>David O'Brien3-16/+20
* elf32-i386-fbsd.c: Always label using the EI_OSABI method. It is benign for FreeBSD < 4.1. Minor reformatting. * elf64-alpha-fbsd.c: Likewise. Approved by: Alan Modra <amodra@bigpond.net.au> Message-ID: <20020917182339.B14457@bubble.sa.bigpond.net.au>
2002-09-17 * elf_i386_relocate_section (R_386_TLS_TPOFF32): Negate addend.Jakub Jelinek2-1/+5
2002-09-17 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.Alan Modra1-0/+4
* cpu-tic4x.c: Ditto.
2002-09-17 * elf64-alpha.c (alpha_elf_size_info): Make static.Alan Modra2-1/+5
2002-09-17 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.Alan Modra2-6/+26
* cpu-tic4x.c: Ditto.
2002-09-17 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): RemoveThiemo Seufer2-2/+5
duplicate define.
2002-09-172002-09-16 Bruno Haible <bruno@clisp.org>David O'Brien9-2/+174
* elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included by a target variant implementation. * elf64-alpha.c: Likewise. * elf32-i386-fbsd.c: New file. * elf64-alpha-fbsd.c: New file. * targets.c: Support bfd_elf32_i386_freebsd_vec and bfd_elf64_alpha_freebsd_vec. * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec, bfd_elf64_alpha_freebsd_vec. * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo. (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c. (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo. (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c. (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies. * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate. * config/tc-i386.h (ELF_TARGET_FORMAT): New macro. (TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf32-i386". * config/tc-i386.c (i386_target_format): Likewise. * config/tc-alpha.h (ELF_TARGET_FORMAT): New macro. (TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf64-alpha". * emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to elf32-i386-freebsd. * emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to elf64-alpha-freebsd. Approved by: Alan Modra <amodra@bigpond.net.au> Message-ID: <20020715021113.GJ30362@bubble.sa.bigpond.net.au>
2002-09-17daily updateAlan Modra1-1/+1