summaryrefslogtreecommitdiffstats
path: root/ld
Commit message (Collapse)AuthorAgeFilesLines
* PR ld/10047Alan Modra2009-04-142-36/+16
| | | | | * ldfile.c (find_scripts_dir): Use make_relative_prefix to find ldscripts in build tree. Don't repeat search for ../lib/ldscripts.
* 2009-04-13 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-04-142-8/+15
| | | | * ldfile.c (ldfile_find_command_file): Revert the last change.
* 2009-04-11 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-04-112-11/+13
| | | | | PR ld/10047 * ldfile.c (ldfile_find_command_file): First try raw name.
* PR 9824Nick Clifton2009-04-092-2/+55
| | | | | | * ld.texinfo (Output Section Constraint): New node. Documents the ONLY_IF_RO and ONLY_IF_RW constraints. (Symbolic Constants): New node. Documents the CONSTANT operator.
* * emultempl/spuelf.em (embedded_spu_file): Use pex_one in placeAlan Modra2009-04-092-24/+20
| | | | of fork/execvp.
* 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2009-04-082-1/+7
| | | | | * ld-i386/abs.d: Add --32 for assembler and -melf_i386 for linker.
* bfd/H.J. Lu2009-04-084-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_link_add_object_symbols): Warn alternate ELF machine code. include/ 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * bfdlink.h (bfd_link_info): Add warn_alternate_em. ld/ 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * lexsup.c (option_values): Add OPTION_WARN_ALTERNATE_EM. (ld_options): Likewise. (parse_args): Likewise. * ld.texinfo: Document --warn-alternate-em. * NEWS: Mention --warn-alternate-em.
* [include/elf]DJ Delorie2009-04-082-1/+5
| | | | | | | | | | | | | | | * mep.h (EF_MEP_CPU_C5): New. [bfd] * archures.c: Add bfd_mach_mep_c5. * bfd-in2.h: Likewise. * cpu-mep.c: Add bfd_c5_arch. * elf32-mep.c: Support it. [gas] * config/tc-mep.c: Add UCI/DSP instruction support. Add C5 support. (md_show_usage): Change default endian to little. * config/tc-mep.h (TARGET_BYTES_BIG_ENDIAN): Change default to little. [ld] * emulparams/elf32mep.sh: Change default endian to little.
* * ld.texinfo (Output Section Address): Note that specifying anNick Clifton2009-04-072-1/+8
| | | | | address for an output section will only change the location counter if the output section is used.
* * ldfile.c (ldfile_find_command_file): Initialize result.Kazu Hirata2009-04-062-1/+5
|
* * ld.texinfo (-L): Mention that -L options do not affect how ldKazu Hirata2009-04-065-19/+64
| | | | | | | | | | | | searches for a linker script unless -T option is specified. * ldfile.c (ldfile_find_command_file): Append the path obtained from the program name to the search path instead of prepending. Add a new parameter "default_only". Restrict the search to the default script location if the new parameter is true. (ldfile_open_command_file_1): New. (ldfile_open_command_file): Call ldfile_open_command_file_1. (ldfile_open_default_command_file): New.
* * ld-scripts/rgn-at.s: Use explicit .section pseudos.Nathan Sidwell2009-04-032-3/+7
|
* * ld-pe/image_size.d (#target): Also run test on Cygwin and x86_64Dave Korn2009-04-032-1/+6
| | | | MinGW targets.
* * ldlang.c (lang_leave_output_section_statement): Set lma_regionNathan Sidwell2009-04-0311-0/+141
| | | | | | | | | | | | | | if it is not overridden and section is for the same vma region as the previous section. * ld-scripts/rgn-at.exp: New. * ld-scripts/rgn-at.s: New. * ld-scripts/rgn-at1.d: New. * ld-scripts/rgn-at1.t: New. * ld-scripts/rgn-at2.d: New. * ld-scripts/rgn-at2.t: New. * ld-scripts/rgn-at3.d: New. * ld-scripts/rgn-at3.t: New.
* * ld-pe/export_dynamic_warning.s: Make dummy code portable.Dave Korn2009-04-032-2/+5
|
* * ld-pe/export_dynamic_warning.d (#warning): Fix regex pattern.Dave Korn2009-04-022-1/+5
|
* ld/ChangeLogDave Korn2009-04-028-0/+42
| | | | | | | | | | | | | | | PR ld/6744 * ld.texinfo (--export-dynamic): Mention --export-all-symbols. * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Issue warning if --export-dynamic was passed on command-line. * emultempl/pep.em (gld_${EMULATION_NAME}_after_parse): Likewise. ld/testsuite/ChangeLog PR ld/6744 * ld-pe/export_dynamic_warning.d: New test control file. * ld-pe/export_dynamic_warning.s: New test source file. * ld-pe/pe.exp: Also run export_dynamic_warning dump test.
* 2009-04-02 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-023-13/+17
| | | | | | | | | | | | | | | bfd/ * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb, elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long branch stubs. (elf32_arm_stub_type): New enum values for the two new stubs. (arm_type_of_stub): Make use of the two new stubs. (arm_size_one_stub): Handle the two new stubs. testsuite/ * ld-arm/farcall-thumb-thumb-pic-veneer.d: Update expected results. * ld-arm/farcall-thumb-thumb.d: Likewise.
* PR 9987Nick Clifton2009-04-022-0/+7
| | | | | * lib/ld-lib.exp (check_gc_sections_available): Do not run garbage collection tests for cygwin targets.
* bfd/Richard Sandiford2009-04-013-1/+15
| | | | | | | | | * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT rather than C_EXT. ld/testsuite/ * ld-powerpc/aix-gc-1.nd: New test. * ld-powerpc/aix52.exp: Run it.
* bfd/Richard Sandiford2009-04-012-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | * bfd-in.h (bfd_xcoff_split_import_path): Declare. (bfd_xcoff_set_archive_import_path): Likewise. * bfd-in2.h: Regenerate. * xcofflink.c: Include libiberty.h. (xcoff_archive_info): New structure. (xcoff_archive_info_hash): New function. (xcoff_archive_info_eq): Likewise. (xcoff_get_archive_info): Likewise. (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info. (bfd_xcoff_split_import_path): New function. (bfd_xcoff_set_archive_import_path): Likewise. (xcoff_set_import_path): Move earlier in file. (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive object to the the directory part of the bfd's filename. Get the import path and filename of an archive object from the archive's xcoff_tdata, initializing it if necessary. Update use of import_file_id. (bfd_link_input_bfd): Update use of import_file_id. (xcoff_write_global_symbol): Likewise. ld/ * emultempl/aix.em (gld${EMULATION_NAME}_open_dynamic_archive): New function. (ld_${EMULATION_NAME}_emulation): Use it.
* bfd/Richard Sandiford2009-04-013-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xcofflink.c (xcoff_link_create_extra_sections): Don't create a .loader section for relocatable links. (xcoff_need_ldrel_p): New function. (xcoff_mark): Use it. (bfd_xcoff_link_count_reloc): Only count loader relocs if there's a loader section. (xcoff_build_ldsym): New function, split out from... (xcoff_build_ldsyms): ...here. Rename to... (xcoff_post_gc_symbol): ...this. Only export symbols, and only call xcoff_build_ldsym, if there's a loader section. (xcoff_build_loader_section): New function, extracted verbatim from... (bfd_xcoff_size_dynamic_sections): ...here. Only call it if there's a loader section. Only add an __rtinit loader symbol if there's a loader section. Update after above name change. (xcoff_symbol_section, xcoff_create_ldrel): New functions. (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section and xcoff_create_ldrel. (xcoff_write_global_symbol): Use xcoff_create_ldrel. (xcoff_reloc_link_order): Likewise, but only call it if there's a loader section. Use xcoff_symbol_section. (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym if there's a loader section. ld/testsuite/ * ld-powerpc/aix-rel-1.s, ld-powerpc/aix-rel-1.od: New test. * ld-powerpc/aix52.exp: Run it.
* binutils/ChangeLogDave Korn2009-04-013-2/+25
| | | | | | | | | | | | | | | | * dlltool.c (set_dll_name_from_def): Accept new second arg that indicates if we are building DLL or EXE, and use it to add a default suffix to the output filename when none is already present. (def_name): Indicate we are building an EXE when calling it. (def_library): Indicate we are building a DLL when calling it. ld/testsuite/ChangeLog * ld-cygwin/exe-export.exp: Add "-lkernel32" when linking test exe. * ld-cygwin/testexe.c (testexe_main): Indicate whether global_a was set to correct final value using error return status. (testexe_dummy): Dummy function calls an import from kernel32.dll to ensure it is mapped into the process space at runtime.
* 2009-04-01 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-015-41/+15
| | | | | | | | | | | | opcodes/ * arm-dis.c (print_insn): Print BE8 opcodes in little endianness. ld/testsuite/ * ld-arm/arm-elf.exp: BE8 tests expect the same output as the default ones. * ld-arm/arm-be8.d: Print opcodes in little endian. * ld-arm/farcall-thumb-arm-be8.d: Removed useless expected result. * ld-arm/farcall-arm-arm-be8.d: Likewise.
* * ld-cris/tls-e-dtpoffd3.d, ld-cris/tls-e-tpoffcomm1.d,Hans-Peter Nilsson2009-03-254-0/+91
| | | | ld-cris/tls-e-tpoffcomm1.s: New tests.
* * ld-cris/tls-commx.s, ld-cris/tls-dso-dtpoffd2.d,Hans-Peter Nilsson2009-03-246-0/+113
| | | | | ld-cris/tls-dso-dtpoffd4.d, ld-cris/tls-dtpoffdx.s, ld-cris/tls-e-dtpoffd1.d: New tests.
* * ld-cris/tls-e-20.d, ld-cris/tls-e-20a.d, ld-cris/tls-e-21.d,Hans-Peter Nilsson2009-03-2415-16/+26
| | | | | | | | | ld-cris/tls-e-80.d, ld-cris/tls-gd-3.d, ld-cris/tls-gd-3h.d, ld-cris/tls-global-74.d, ld-cris/tls-ldgde-14.d, ld-cris/tls-ldgde-15.d, ld-cris/tls-legd-16.d, ld-cris/tls-legd-17.d, ld-cris/tls-local-57.d, ld-cris/tls-local-58.d, ld-cris/tls-local-59.d: Adjust for BFD change in link-time known GOT contents for GD relocations.
* ld/H.J. Lu2009-03-206-3/+35
| | | | | | | | | | | | | | | | | 2009-03-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/9970 * ldlang.c (lang_end): Warn missing entry symbol for -pie. ld/testsuite/ 2009-03-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/9970 * ld-pie/pie.exp: Use -fpie to compile. Run *.d tests. * ld-pie/start.d: New. * ld-pie/start.s: Likewise.
* bfd/Alan Modra2009-03-192-2/+11
| | | | | | | | | | | | * elf32-spu.c (spu_elf_find_overlays): Separate error return from "no overlays" return. If there are overlays, create overlay manager entry symbols here, so that.. (spu_elf_build_stubs): ..we don't need to set them up here. Simplify entry symbol tests. * elf32-spu.h (spu_elf_find_overlays): Update prototype. ld/ * emultempl/spuelf.em (spu_before_allocation): Report errors from spu_elf_find_overlays.
* ld/H.J. Lu2009-03-1812-0/+110
| | | | | | | | | | | | | | | | | | | | | | 2009-03-18 H.J. Lu <hongjiu.lu@intel.com> PR ld/6766 * lexsup.c (parse_args): Call ldlang_add_undef for -e. ld/testsuite/ 2009-03-18 H.J. Lu <hongjiu.lu@intel.com> PR ld/6766 * ld-undefined/dummy.s: New. * ld-undefined/entry-1.d: Likewise. * ld-undefined/entry-2.d: Likewise. * ld-undefined/entry-3.d: Likewise. * ld-undefined/entry-4.d: Likewise. * ld-undefined/entry-5.d: Likewise. * ld-undefined/entry-6.d: Likewise. * ld-undefined/entry.exp: Likewise. * ld-undefined/entry.s: Likewise.
* include/Alan Modra2009-03-182-19/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13 documentation. bfd/ * elf32-m68hc1x.c: Include alloca-conf.h. * xsym.c: Likewise. * elf64-hppa.c: Likewise. Remove existing #if's handling alloca. * som.c: Likewise. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. binutils/ * sysdep.h: Include alloca-conf.h instead of config.h and remove existing #if's handling alloca. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. gas/ * as.h: Include alloca-conf.h instead of config.h and remove existing #if's handling alloca. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. opcodes/ * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * openrisc-opc.c: Regenerate. ld/ * ld.h: Remove alloca handling.
* bfd/Alan Modra2009-03-176-48/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit. Add compact_stub. (emum _ovly_flavour): Delete ovly_compact, ovly_none. * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and ovly_return fields with ovly_entry[2]. Adjust all users. (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler when soft-icache. (spu_elf_build_stubs): Likewise. (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for ovly_flavour changes. Update all callers. (ovl_stub_size_log2): New function. (build_stub): Handle compact icache stubs. Use different manager entry point for stubs in non-icache area. (spu_elf_size_stubs): Don't allocate space for indirect branch descriptors. (spu_elf_build_stubs): And don't built them. ld/ * emultempl/spu_icache.S: Add new entry to dummy handler. * emultempl/spu_icache.o_c: Regenerate. * emultempl/spuelf.em (params): Init new field. (no_overlays): New static var. (spu_before_allocation): Use it. (OPTION_SPU_COMPACT_STUBS): Define. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add compact-stubs. (PARSE_AND_LIST_ARGS_CASES): Handle compact-stubs. Adjust no-overlays handling. ld/testsuite/ * ld-spu/icache1.d: Update for fixed set_id, new manager entry, and reduced data.
* ld/Alan Modra2009-03-174-2/+20
| | | | | | | | * configure.host (HOSTING_LIBS): Two dollars on shell variable expansion to suit make. ld/testsuite * config/default.exp (get_link_files): Replace double dollars with single dollars.
* ld/Alan Modra2009-03-178-17/+64
| | | | | | | | | | | * configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL. * Makefile.am (check-DEJAGNU): Set DO_COMPARE. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. ld/testsuite/ * ld-bootstrap/bootstrap.exp: Use DO_COMPARE. Remove unnecessary cleanup and log output.
* * ld-bootstrap/bootstrap.exp: Also pass '-liconv' to linker whenDave Korn2009-03-162-3/+16
| | | | linking statically on Cygwin, necessitated by '-lintl'.
* * ld-auto-import/auto-import.exp: Add missing dll entrypoint.Dave Korn2009-03-152-1/+5
|
* include/coff/Richard Sandiford2009-03-148-2/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags. (xcoff_loader_info): Add auto_export_flags. bfd/ * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the bfd_boolean export_defineds parameter with an unsigned int auto_export_flags parameter. * bfd-in2.h: Regenerate. * xcofflink.c (xcoff_archive_contains_shared_object_p): New function, split out from xcoff_build_ldsyms. (xcoff_covered_by_expall_p): New function. (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms but with extra code to handle -bexpfull and -bexpall. (xcoff_mark_auto_exports): New function. (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether a function should be automatically exported. (bfd_xcoff_size_dynamic_sections): Replace the export_defineds parameter with an auto_export_flags parameter. Update ldinfo accordingly. Use xcoff_mark_auto_exports to mark all automatically- exported symbols. ld/ * emultempl/aix.em (auto_export_flags): New variable. (explicit_auto_export_flags): Likewise. (OPTION_EXPALL, OPTION_EXPFULL): New enum values. (OPTION_NOEXPALL, OPTION_NOEXPFULL): Likewise. (gld${EMULATION_NAME}_add_options): Add -bexpall, -bexpfull, -bnoexpall and -bnoexpfull. (gld${EMULATION_NAME}_handle_option): Handle them. (gld${EMULATION_NAME}_before_allocation): Update the call to bfd_size_dynamic_sections. ld/testsuite/ * ld-powerpc/aix-export-1-all.dd, ld-powerpc/aix-export-1-full.dd, ld-powerpc/aix-export-1a.s, ld-powerpc/aix-export-1b.s: New tests. * ld-powerpc/aix52.exp: Run them.
* bfd/Richard Sandiford2009-03-149-0/+275
| | | | | | | | | | | | | | * xcofflink.c (xcoff_mark_symbol_by_name): New function. (bfd_xcoff_size_dynamic_sections): Use it to mark the entry, init and fini functions. Do garbage collection for objects without an entry point too. ld/testsuite/ * ld-powerpc/aix-gc-1.s, ld-powerpc/aix-gc-1.ex, ld-powerpc/aix-gc-1-32.dd, ld-powerpc/aix-gc-1-64.dd, ld-powerpc/aix-weak-1-gcdso.dnd, ld-powerpc/aix-weak-1-gcdso.hd, ld-powerpc/aix-weak-1-gcdso.nd: New tests. * ld-powerpc/aix52.exp: Run them.
* include/coff/Richard Sandiford2009-03-1435-0/+688
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * internal.h (C_AIX_WEAKEXT): New macro. (C_WEAKEXT): Use the GNU definition in the generic part of the file, and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of the file. (CSECT_SYM_P): New macro. * xcoff.h (L_WEAK): Define. (EXTERN_SYM_P): New macro. bfd/ * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to check whether a symbol has csect information. (coff_print_aux): Likewise. * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect information for C_AIX_WEAKEXT too. (_bfd_xcoff_swap_aux_out): Likewise. (xcoff_reloc_type_br): Handle defweak symbols too. * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect information for C_AIX_WEAKEXT too. (_bfd_xcoff64_swap_aux_out): Likewise. (xcoff64_reloc_type_br): Handle defweak symbols too. * coffgen.c (coff_print_symbol): Handle auxillary function information for C_AIX_WEAKEXT too. * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK instead of BSF_GLOBAL if the L_WEAK flag is set. (xcoff_dynamic_definition_p): New function. (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym defines h. Don't change h if ldsym isn't the definition. Otherwise, always take the symbol class from the ldsym. Use weak bfd symbol types for weak ldsyms. (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P. Fix the check for whether a definition is from a shared object. Allow redefinitions of weak symbols. (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P. (xcoff_keep_symbol_p): Likewise. (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P. (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P. Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols, but mark them as L_WEAK. (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT. gas/ * config/tc-ppc.c (ppc_frob_symbol): Add csect information for C_AIX_WEAKEXT too. ld/testsuite/ * ld-powerpc/aix-glink-2a.s, ld-powerpc/aix-glink-2a.ex, ld-powerpc/aix-glink-2b.s, ld-powerpc/aix-glink-2c.s, ld-powerpc/aix-glink-2c.ex, ld-powerpc/aix-glink-2d.s, ld-powerpc/aix-glink-2-32.dd, ld-powerpc/aix-glink-2-64.dd, ld-powerpc/aix-weak-1a.s, ld-powerpc/aix-weak-1b.s, ld-powerpc/aix-weak-1-rel.hd, ld-powerpc/aix-weak-1-rel.nd, ld-powerpc/aix-weak-1-dso.hd, ld-powerpc/aix-weak-1-dso.nd, ld-powerpc/aix-weak-1-dso.dnd, ld-powerpc/aix-weak-1.ex, ld-powerpc/aix-weak-2a.s, ld-powerpc/aix-weak-2a.ex, ld-powerpc/aix-weak-2a.nd, ld-powerpc/aix-weak-2b.s, ld-powerpc/aix-weak-2b.nd, ld-powerpc/aix-weak-2c.s, ld-powerpc/aix-weak-2c.ex, ld-powerpc/aix-weak-2c.nd, ld-powerpc/aix-weak-2c.od, ld-powerpc/aix-weak-3a.s, ld-powerpc/aix-weak-3a.ex, ld-powerpc/aix-weak-3b.s, ld-powerpc/aix-weak-3b.ex, ld-powerpc/aix-weak-3-32.d, ld-powerpc/aix-weak-3-32.dd, ld-powerpc/aix-weak-3-64.d, ld-powerpc/aix-weak-3-64.dd: New tests. * ld-powerpc/aix52.exp: Run them. Replace tmp/aix-* with tmp/aix64-* in 64-bit ld options.
* include/coff/Richard Sandiford2009-03-1412-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | * xcoff.h (XCOFF_ALLOCATED): New flag. bfd/ * xcofflink.c (xcoff_mark): When walking the relocations, only mark the target symbol or the target section, not both. (xcoff_final_definition_p): New function. (xcoff_keep_symbol_p): Use it to check whether an external XCOFF symbol is a valid definition of the associated output symbol. Use XCOFF_ALLOCATED to stop the same hash table entry having two output symbols. (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when keeping a symbol. (xcoff_link_input_bfd): Use xcoff_final_definition_p. ld/testsuite/ * ld-powerpc/aix-no-dup-syms-1a.s, ld-powerpc/aix-no-dup-syms-1b.s, ld-powerpc/aix-no-dup-syms-1.ex, ld-powerpc/aix-no-dup-syms-1.im, ld-powerpc/aix-no-dup-syms-1-dso.dnd, ld-powerpc/aix-no-dup-syms-1-dso.drd, ld-powerpc/aix-no-dup-syms-1-dso.nd, ld-powerpc/aix-no-dup-syms-1-dso.rd, ld-powerpc/aix-no-dup-syms-1-rel.nd, ld-powerpc/aix-no-dup-syms-1-rel.rd: New tests. * ld-powerpc/aix52.exp: Run them.
* bfd/Richard Sandiford2009-03-144-2/+14
| | | | | | | | | | * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute symbols as XMC_XO. ld/testsuite/ * ld-powerpc/aix-abs-branch-1.nd, ld-powerpc/aix-abs-reloc-1.nd: New tests. * ld-powerpc/aix52.exp: Run them.
* bfd/Richard Sandiford2009-03-148-0/+105
| | | | | | | | | | | | | | | | | | | | | | | * libcoff-in.h (xcoff_tdata): Add a lineno_counts field. * libcoff.h: Regenerate. * xcofflink.c (xcoff_link_add_symbols): Record per-symbol line-number counts in the bfd's lineno_counts field. Don't keep per-csect line-number counts. (xcoff_sweep): Don't update per-csect line-number counts. (bfd_xcoff_size_dynamic_sections): Count the number of line-number entries in each output section. (xcoff_link_input_bfd): Get the number of line numbers from the bfd's lineno_counts field, rather than recalculating it from scratch. Fix the range check when updating C_BINCL and C_EINCL symbols. (_bfd_xcoff_bfd_final_link): Don't count the output line numbers here. Don't expect csects to have line-number counts. ld/testsuite/ * ld-powerpc/aix-lineno-1.s, ld-powerpc/aix-lineno-1.txt, ld-powerpc/aix-lineno-1a.dd, ld-powerpc/aix-lineno-1a.nd, ld-powerpc/aix-lineno-1b.dd, ld-powerpc/aix-lineno-1b.nd: New tests. * ld-powerpc/aix52.exp: Run them. Copy aix-lineno-1.txt to tmpdir.
* bfd/Richard Sandiford2009-03-147-0/+84
| | | | | | | | | | | | | | | | | | * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when creating a descriptor. (xcoff_sweep): Don't mark toc_section unless it's needed. (bfd_xcoff_size_dynamic_sections): Skip the toc_section when marking every bfd. (xcoff_link_input_bfd): Skip all TOC anchors. (xcoff_toc_section_p, xcoff_find_tc0): New functions. (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor to -1; call xcoff_find_tc0 instead. ld/testsuite/ * ld-powerpc/aix-toc-1.ex, ld-powerpc/aix-toc-1a.s, ld-powerpc/aix-toc-1b.s, ld-powerpc/aix-toc-1-32.dd, ld-powerpc/aix-toc-1-64.dd: New tests. * ld-powerpc/aix52.exp: Run them.
* include/coff/Richard Sandiford2009-03-1410-2/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments. (XCOFF_WAS_UNDEFINED): New flag. (xcoff_link_hash_table): Add an "rtld" field. bfd/ * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED flag is set. Assert that all undefined symbols are either imported or defined by a dynamic object. * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise. * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol handling to all relocations. Only set XCOFF_CALLED for function symbols. (xcoff_find_function): New function, split out from... (bfd_xcoff_export_symbol) ...here. (xcoff_set_import_path): New function, split out from... (bfd_xcoff_import_symbol): ...here. Remove assertion for old meaning of XCOFF_CALLED. (xcoff_mark_symbol): If we mark an undefined and unimported symbol, find some way of defining it. If the symbol is a function descriptor, fill in its definition automatically. If the symbol is a function, mark its descriptor and allocate room for global linkage code. Otherwise mark the symbol as implicitly imported. Move the code for creating function descriptors from... (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to check for symbols that were implicitly defined. (xcoff_mark): Don't count any dynamic relocations against function symbols. (bfd_xcoff_size_dynamic_sections): Save the rtld parameter in the xcoff link info. (xcoff_link_input_bfd): Remove handling of undefined and unexported symbols. ld/ * emultempl/aix.em (gld${EMULATION_NAME}_handle_option): Make -berok and -bernotok control link_info.unresolved_syms_in_objects and link_info.unresolved_syms_in_shared_libs instead of force_make_executable. ld/testsuite/ * ld-powerpc/aix-glink-1.ex, ld-powerpc/aix-glink-1.s, ld-powerpc/aix-glink-1-32.dd, ld-powerpc/aix-glink-1-64.dd, ld-powerpc/aix-glink-1-32.d, ld-powerpc/aix-glink-1-64.d: New tests. * ld-powerpc/aix52.exp: Run them.
* bfd/Richard Sandiford2009-03-146-0/+43
| | | | | | | | | | | | | | * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute if the target is absolute. Fix comment typo. (xcoff_ppc_relocate_section): Remove FIXME. * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute if the target is absolute. ld/testsuite/ * ld-powerpc/aix-abs-branch-1.im, ld-powerpc/aix-abs-branch-1.ex, ld-powerpc/aix-abs-branch-1.s, ld-powerpc/aix-abs-branch-1.dd: New test. * ld-powerpc/aix52.exp: Run it.
* bfd/Richard Sandiford2009-03-146-0/+25
| | | | | | | | | | | * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy R_POS and R_NEG relocations against absolute symbols to the .loader section. ld/testsuite/ * ld-powerpc/aix-abs-reloc-1.ex, ld-powerpc/aix-abs-reloc-1.im, ld-powerpc/aix-abs-reloc-1.od, ld-powerpc/aix-abs-reloc-1.s: New test. * ld-powerpc/aix52.exp: Run it.
* ld/Richard Sandiford2009-03-142-0/+6
| | | | | * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Set config.dynamic_link to TRUE.
* ld/Richard Sandiford2009-03-1413-1/+172
| | | | | | | | | | | | | * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Mark .text, .data and .bss output sections as SEC_KEEP. ld/testsuite/ * ld-powerpc/aix-core-sec-1.s, ld-powerpc/aix-core-sec-1.ex, ld-powerpc/aix-core-sec-1.hd, ld-powerpc/aix-core-sec-2.s, ld-powerpc/aix-core-sec-2.ex, ld-powerpc/aix-core-sec-2.hd, ld-powerpc/aix-core-sec-3.s, ld-powerpc/aix-core-sec-3.ex, ld-powerpc/aix-core-sec-3.hd: New tests. * ld-powerpc/aix52.exp: New harness.
* bfd/Richard Sandiford2009-03-142-2/+6
| | | | | | | | | | | | | | | | | | | * config.bfd: Treat AIX 6+ in the same way as AIX 5. * configure.in: Likewise. * configure: Regenerate. binutils/ * configure.tgt: Extend AIX 5 behavior to AIX 6 and above. * configure.in: Likewise. * configure: Regenerate. gas/ * configure.tgt: Extend AIX 5 behavior to AIX 6 and above. * configure.in: Likewise. * configure: Regenerate. ld/ * configure.tgt: Extend AIX 5 behavior to AIX 6 and above.
* ld/testsuite/Richard Sandiford2009-03-142-10/+17
| | | | | | | * lib/ld-lib.exp (ar_simple_create): Add an "aropts" parameter. (run_ld_link_tests): Treat the second list element as "ar" options when creating an archive. Don't run the linker in this case. (run_cc_link_tests): Likewise.
OpenPOWER on IntegriCloud