aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2003-05-30bfd/Jakub Jelinek17-3/+117
* elflink.h (elf_link_add_object_symbols): Use !info->executable instead of info->shared where appropriate. (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise. * elflink.c (_bfd_elf_create_got_section): Likewise. (_bfd_elf_link_create_dynamic_sections): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section and DT_DEBUG dynamic tag even for position independent executables. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise. * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise. * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise. * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise. include/ * bfdlink.h (struct bfd_link_info): Add pie and executable bits. ld/ * lexsup.c (OPTION_PIE): Define. (ld_options): Add -pie and --pic-executable options. (parse_args): Handle OPTION_PIE. * ldmain.c (main): Initialize link_info.pie and link_info.executable. * genscripts.sh: Generate PIE scripts. * ld.texinfo: Document -pie and --pic-executable options. * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): (gld${EMULATION_NAME}_place_orphan): Likewise. (gld${EMULATION_NAME}_get_script): Include PIE scripts. * scripttempl/elf.sc: In PIE scripts set . the same way as in shared scripts. * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes. * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
2003-05-30ld/H.J. Lu4-0/+25
2003-05-30 H.J. Lu <hongjiu.lu@intel.com> * genscripts.sh: Create tmpdir/libpath.exp. ld/testsuite/ 2003-05-30 H.J. Lu <hongjiu.lu@intel.com> * config/default.exp: Load tmpdir/libpath.exp. (gcc_ld_flag): Set from $libpath.
2003-05-30(arm_elf_before_allocation): Replace ASSERT with a test for a NULLNick Clifton2-2/+11
bfd_for_interworking.
2003-05-29* configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBSJason Thorpe2-8/+39
correctly for more recent versions of NetBSD. (alpha*-*-netbsd*): Remove. (i[3-7]86-*-netbsd*): Remove.
2003-05-29Replace <ctype.h> with "safe-ctype.h"Nick Clifton2-3/+6
2003-05-29* ld-elf/elf.exp: Use if_elf_format.Jason Thorpe5-28/+11
* ld-elf/sec64k.exp: Likewise. * ld-elfcomm/elfcomm.exp: Likewise. * lib/ld-lib.exp (is_elf_format): Match hppa*64*-*-hpux*.
2003-05-26* emulparams/elf64btsmip.sh: Set TEXT_START_ADDR to 0x120000000 toMaciej W. Rozycki2-0/+6
trap on pointer crops.
2003-05-25* ld-mips-elf/mips-elf.exp: Make all NetBSD targets match as elf.Jason Thorpe2-1/+5
2003-05-21Check for a target triplet of shl-...-netbsdelf as well as shle-...-netbsdelf.Nick Clifton2-1/+6
2003-05-20bfd/H.J. Lu5-0/+92
2003-05-20 Jakub Jelinek <jakub@redhat.com> * elflink.h (elf_link_output_extsym): Only issue error about != STV_DEFAULT symbols if they are bfd_link_hash_undefined. 2003-05-20 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF when removing the old definition for symbols with non-default visibility. ld/testsuite/ 2003-05-20 Jakub Jelinek <jakub@redhat.com> * ld-elfvsb/common.c: New file. * ld-elfvsb/elfvsb.exp: Add common. 2003-05-20 H.J. Lu <hongjiu.lu@intel.com> * ld-elfvsb/sh3.c: New file. * ld-elfvsb/test.c: Likewise. * ld-elfvsb/elfvsb.exp: Add new weak hidden symbol tests.
2003-05-16Replace i[3456]86 with i[3-7]86Nick Clifton3-60/+65
2003-05-162003-05-15 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu7-37/+65
* config/default.exp (gcc_ld_flag): New. Make the newly built linker available to gcc. * lib/ld-lib.exp (default_ld_simple_link): Pass $gcc_ld_flag to gcc. * ld-elfvers/vers.exp: Use "ld_simple_link $CC" to build shared libraries. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfweak/elfweak.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-elfvers/vers.exp: Use "-Wl,-rpath,." to build shared libraries. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvsb/elfvsb.exp: Remove xfail for powerpc-*-linux*. * ld-elfweak/elfweak.exp: Use PIC for shared libraries.
2003-05-152003-05-15 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-1/+7
* emulparams/elf64_ia64.sh: Don't set COMMONPAGESIZE for now.
2003-05-13 * ld-m68hc11/link-hcs12.d: New test.Stephane Carrez4-0/+43
* ld-m68hc11/link-hcs12.s: New file. * ld-m68hc11/link-hc12.s: New file.
2003-05-132003-05-13 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-2/+6
* ld-elfweak/elfweak.exp: Fix typo.
2003-05-13Run on sh[34]*-*-linux*.Nick Clifton4-5/+14
2003-05-12 * ld-mmix/b-fixo2.d, ld-mmix/bpo-18.d, ld-mmix/bpo-18m.d,Hans-Peter Nilsson23-44/+55
ld-mmix/loc4.d, ld-mmix/loc4m.d, ld-mmix/loc6.d, ld-mmix/loc6m.d, ld-mmix/locdo-1.d, ld-mmix/sec-1.d, ld-mmix/sec-2.d, ld-mmix/sec-3.d, ld-mmix/sec-4.d, ld-mmix/sec-5.d, ld-mmix/sec-7m.d, ld-mmix/sec-8m.d, ld-mmix/spec802.d, ld-mmix/spec803.d, ld-mmix/spec804.d, ld-mmix/spec805.d, ld-mmix/spec806.d, ld-mmix/spec807.d, ld-mmix/spec808.d: Tweak for objdump no longer truncating dump addresses.
2003-05-09Add missing changelog entry for last commit:Daniel Jacobowitz1-0/+1
* configure.tgt: Add armeb-elf and arm*b-*-linux-gnu.
2003-05-09 * Makefile.am (ALL_EMULATIONS): Add earmelfb.o and earmelfb_linux.o.Daniel Jacobowitz6-0/+35
(earmelfb.c, earmelfb_linux.c): New rules. * Makefile.in: Regenerated. * emulparams/armelfb.sh, emulparams/armelfb_linux.sh: New files.
2003-05-09oops - update date in ChangeLog entryNick Clifton1-1/+1
2003-05-09Default to generating a fatal error message if a loadable section is notNick Clifton2-4/+26
allocated to a memory region when regions are defined.
2003-05-09 * ld-elfvsb/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frameMartin Schwidefsky7-2/+34
to linker script. * ld-elfvsb/elfvsb.exp (visibility_run): Add setup_xfails for s390x. * ld-selective/selective.exp: Disable for s390 and s390x. * ld-shared/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame to linker script. * ld-shared/shared.exp (shared_test): Add setup_xfails for s390x. * ld-undefined/undefined.exp (checkund): Remove setup_xfail for s390x.
2003-05-09 * Makefile.am (em68hc11elf.c): Correct dependencies.Alan Modra4-12/+20
(em68hc11elfb.c, em68hc12elf.c, em68hc12elfb.c): Likewise. * Makefile.in: Regenerate. * emultempl/elf32.em (find_exp_assignment): Adjust for changed bfd_elf_record_link_assignment name.
2003-05-082003-05-08 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu4-0/+14
* ld-elfvers/vers.exp: Add vers27d4 and vers27d5 to test versioned reference for hidden symbol. * ld-elfvers/vers27d4.dsym: New file. * ld-elfvers/vers27d4.ver: Likewise.
2003-05-082003-05-07 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-2/+17
* ld-elfvers/vers27d3.c (__start): New. (start): New.
2003-05-082003-05-07 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu8-4/+60
* ld-elfvers/vers.exp (build_binary): Support build exeutable. (build_binary): Renamed from ... (build_vers_lib): This. (build_vers_lib_no_pic): Updated. (build_vers_lib_pic): Likewise. Add vers27d1, vers27d2 and vers27d3 to test versioned definition for hidden symbol referenced by a DSO. * ld-elfvers/vers27d.dsym: New file. * ld-elfvers/vers27d.sym: Likewise. * ld-elfvers/vers27d.ver: Likewise. * ld-elfvers/vers27d1.c: Likewise. * ld-elfvers/vers27d2.c: Likewise. * ld-elfvers/vers27d3.c: Likewise.
2003-05-07 * ld-elfvsb/elfvsb.exp: Run dump tests even when crossAndreas Schwab2-3/+8
compiling.
2003-05-07* config/default.exp (gcc_gas_flags): Force ABI to n32 onAlexandre Oliva4-28/+61
mips64-linux. * ld-elf/merge.d: Xfail on mips64*-linux-gnu*. * ld-mips-elf/mips-elf-flags.exp (ldemul): Set to o32-compatible on mips-sgi-irix6*, mips64-linux-gnu and mips64el-linux-gnu. (good_combination, bad_combination): Use it. Add -32 or -mabi=o64 wherever the ABI was formerly implied.
2003-05-07* ldmain.h (overflow_cutoff_limit): Declare.Alexandre Oliva4-0/+30
* ldmain.c (overflow_cutoff_limit): Define, initialized to 10. (reloc_overflow): Limit error messages based on it. * lexsup.c (parse_args) <OPTION_VERBOSE>: Set cutoff to unlimited.
2003-05-062003-05-06 H.J. Lu <hjl@gnu.org>H.J. Lu12-1/+31
* ld-elfvers/vers.exp (objdump_versionstuff): Support comment in expected version file. * ld-elfvers/vers25b.c: Add a line of comment. * ld-elfvers/vers25b.dsym: Likwise. * ld-elfvers/vers25b.ver: Likwise. * ld-elfvers/vers26b.dsym: Likwise. * ld-elfvers/vers26b.ver: Likwise. * ld-elfvers/vers27b.dsym: Likwise. * ld-elfvers/vers27b.ver: Likwise. * ld-elfvers/vers27c.c: Likwise. * ld-elfvers/vers27c.dsym: Likwise. * ld-elfvers/vers27c.ver: Likwise.
2003-05-05 * ldlex.l: Accept C style comments in version scripts.Alan Modra2-1/+5
2003-05-05bfd/H.J. Lu3-0/+67
2003-05-04 H.J. Lu <hjl@gnu.org> * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic relocation entries for weak undefined symbols with non-default visibility. (elf_i386_relocate_section): Initialize the GOT entries and skip R_386_32/R_386_PC32 for weak undefined symbols with non-default visibility. * elfxx-ia64.c (allocate_fptr): Don't allocate function descriptors for weak undefined symbols with non-default visibility. (allocate_dynrel_entries): Don't allocate relocation entries for symbols resolved to 0. (set_got_entry): Don't install dynamic relocation for weak undefined symbols with non-default visibility. (set_pltoff_entry): Likewise. * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols with non-default visibility. (elf_link_output_extsym): Don't make weak undefined symbols with non-default visibility dynamic. ld/testsuite/ 2003-05-04 H.J. Lu <hjl@gnu.org> * ld-elfvsb/main.c: Updated. * ld-elfvsb/sh1.c: Likewise.
2003-05-05Add missing entries for the last checkin.H.J. Lu1-0/+3
2003-05-05bfd/H.J. Lu7-22/+13
2003-05-04 H.J. Lu <hjl@gnu.org> * elflink.h (elf_merge_symbol): Correctly handle weak definiton. ld/testsuite/ 2003-05-04 H.J. Lu <hjl@gnu.org> * ld-elfvers/vers18.dsym: Updated for weak definiton change. * ld-elfvers/vers18.ver: Likewise. * ld-elfvers/vers19.ver: Likewise. * ld-elfweak/elfweak.exp: Remove xfail.
2003-05-04* ld-mips-elf/multi-got-1.d: Force into big-endian mode.Alexandre Oliva2-8194/+8199
Turn relocation offsets into regexps.
2003-05-032003-05-03 H.J. Lu <hjl@gnu.org>H.J. Lu12-0/+38
* ld-elfvers/vers.exp: Add vers27a, vers27b, vers27c1 and vers27c2 to test versioned definition vs. hidden definition in different files. * ld-elfvers/vers27a.c: New file. * ld-elfvers/vers27a.dsym: Likewise. * ld-elfvers/vers27a.map: Likewise. * ld-elfvers/vers27a.ver: Likewise. * ld-elfvers/vers27b.c: Likewise. * ld-elfvers/vers27b.dsym: New empty file. * ld-elfvers/vers27b.ver: Likwise. * ld-elfvers/vers27c.c: Likwise. * ld-elfvers/vers27c.dsym: Likwise. * ld-elfvers/vers27c.ver: Likwise.
2003-05-02Fix xstormy16's handling of pc-relative relocs against defined symbols.Nick Clifton5-0/+116
2003-05-02 * ld-elfvers/vers.exp (build_exec): Disable vers26b3 on x86-64-linux.Andreas Jaeger2-2/+11
2003-05-01gas/H.J. Lu8-83/+92
2003-04-30 H.J. Lu <hjl@gnu.org> * config/tc-ia64.c (md_section_align): Deleted. * config/tc-ia64.h (SUB_SEGMENT_ALIGN): New. (md_section_align): New. gas/testsuite/ 2003-04-29 H.J. Lu <hjl@gnu.org> * gas/ia64/ia64.exp: Add align. * gas/ia64/align.d: New file. * gas/ia64/align.s: Likewise. * ia64/dependency-1.d: Remove the padding. ld/testsuite/ 2003-04-29 H.J. Lu <hjl@gnu.org> * ld-ia64/tlsbin.dd: Updated. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlsbin.sd: Likewise. * ld-ia64/tlsbin.td: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-ia64/tlspic.sd: Likewise. * ld-ia64/tlspic.td: Likewise.
2003-04-30 * ld-selective/3.cc (start): New function.Joern Rennecke4-1/+25
* ld-selective/4.cc: Likewise. * ld-selective/5.cc: Likewise.
2003-04-29bfd/H.J. Lu3-0/+16
2003-04-28 H.J. Lu <hjl@gnu.org> * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during the relax finalize pass. * section.c (struct sec): Add need_finalize_relax and remove flag11. (STD_SECTION): Update struct sec initializer. * bfd-in2.h: Regenerated. include/ 2003-04-28 H.J. Lu <hjl@gnu.org> * bfdlink.h (bfd_link_info): Add relax_finalizing. ld/ 2003-04-28 H.J. Lu <hjl@gnu.org> * ldlang.c (lang_process): Add the relax finalize pass. * ldmain.c (main): Initialize link_info.relax_finalizing to FALSE.
2003-04-28bfd/H.J. Lu9-21/+101
2003-04-28 H.J. Lu <hjl@gnu.org> * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol to copy any information related to dynamic linking when we flip the indirection. ld/testsuite/ 2003-04-28 H.J. Lu <hjl@gnu.org> * ld-elfvers/vers.exp (picflag): Set PIC flag for compiler. (build_vers_lib): Support PIC. (build_vers_lib_no_pic): New. Change all calls to build_vers_lib to build_vers_lib_no_pic. (build_vers_lib_pic): New. Add tests vers26a, vers26b1, vers26b2 and vers26b3 for versioned definition vs. normal definition in different files. * ld-elfvers/vers26a.c: New file. * ld-elfvers/vers26a.dsym: Likewise. * ld-elfvers/vers26a.map: Likewise. * ld-elfvers/vers26a.ver: Likewise. * ld-elfvers/vers26b.c: Likewise. * ld-elfvers/vers26b.dsym: New empty file. * ld-elfvers/vers26b.ver: Likewise.
2003-04-28bfd/H.J. Lu6-1/+185
2003-04-27 H.J. Lu <hjl@gnu.org> * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New. (ELF_LINK_DYNAMIC_WEAK): New. * elflink.h (elf_merge_symbol): Add one argument to indicate if a symbol should be skipped. Ignore definitions in dynamic objects for symbols with non-default visibility. (elf_add_default_symbol): Adjusted. (elf_link_add_object_symbols): Check if a symbol should be skipped. Don't merge the visibility field with the one from a dynamic object. (elf_link_check_versioned_symbol): Use undef_bfd. (elf_link_output_extsym): Warn if a forced local symbol is referenced from dynamic objects. Make non-weak undefined symbol with non-default visibility a fatal error. ld/testsuite/ 2003-04-27 H.J. Lu <hjl@gnu.org> * ld-elfvsb/elfvsb.dat: Updated. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvsb/main.c: Likewise. * ld-elfvsb/sh1.c: Likewise. * ld-elfvsb/sh2.c: Likewise.
2003-04-26 PR savannah/3331:Stephane Carrez3-0/+42
* elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group when we couldn't relax something. * ld-m68hc11/bug-3331.d: New test. * ld-m68hc11/bug-3331.s: New file.
2003-04-25 * lib/ld-lib.exp (big_or_little_endian): Also check for -mb and -ml.Joern Rennecke2-2/+7
2003-04-242003-04-24 J"orn Rennecke <joern.rennecke@superh.com>H.J. Lu2-7/+11
* ld-elfcomm/elfcomm.exp: Allow symbols to have '_' prepended.
2003-04-24.Roland McGrath1-4/+9
2003-04-242003-04-24 Roland McGrath <roland@redhat.com>Roland McGrath1-25/+37
* ldgram.y (phdr_type): Grok PT_TLS and PT_GNU_EH_FRAME names. If a name string is unknown, give an error rather than crashing later.
2003-04-24oops - omitted from previous deltaNick Clifton6-0/+188
2003-04-24Add support for h8300hn and h8300snNick Clifton6-3/+59