Alan Modra
e0468e59ad
* emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
...
call ppc64_elf_tls_optimize.
2003-02-04 14:51:35 +00:00
Daniel Jacobowitz
3dc16cab3d
* emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
...
outside of GNU/Linux conditional.
2003-02-03 17:47:23 +00:00
Alan Modra
f0abc2a11f
include/elf/ChangeLog
...
* sh.h: Split out various bits to bfd/elf32-sh64.h.
include/opcode/ChangeLog
* m68hc11.h (cpu6812s): Define.
bfd/ChangeLog
* elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
dynindx to an int. Rearrange for better packing.
* elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
* elf32-mips.c (bfd_elf32_new_section_hook): Define.
* elf32-sh64.h: New. Split out from include/elf/sh.h.
(struct _sh64_elf_section_data): New struct.
(sh64_elf_section_data): Don't dereference sh64_info (was tdata).
* elf32-sh64-com.c: Include elf32-sh64.h.
* elf32-sh64.c: Likewise.
(sh64_elf_new_section_hook): New function.
(bfd_elf32_new_section_hook): Define.
(sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
(sh64_bfd_elf_copy_private_section_data): Likewise.
(sh64_elf_final_write_processing): Likewise.
* elf32-sparc.c (struct elf32_sparc_section_data): New.
(elf32_sparc_new_section_hook): New function.
(SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
(sec_do_relax): Define.
(elf32_sparc_relax_section): Adjust to use sec_do_relax.
(elf32_sparc_relocate_section): Likewise.
* elf64-mips.c (bfd_elf64_new_section_hook): Define.
* elf64-mmix.c (struct _mmix_elf_section_data): New.
(mmix_elf_section_data): Define. Use throughout file.
(mmix_elf_new_section_hook): New function.
(bfd_elf64_new_section_hook): Define.
* elf64-ppc.c (struct _ppc64_elf_section_data): New.
(ppc64_elf_section_data): Define. Use throughout.
(ppc64_elf_new_section_hook): New function.
(bfd_elf64_new_section_hook): Define.
* elf64-sparc.c (struct sparc64_elf_section_data): New.
(sparc64_elf_new_section_hook): New function.
(SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
(sec_do_relax): Define.
(sparc64_elf_relax_section): Adjust to use sec_do_relax.
(sparc64_elf_relocate_section): Likewise.
(bfd_elf64_new_section_hook): Define.
* elfn32-mips.c (bfd_elf32_new_section_hook): Define.
* elfxx-mips.c (struct _mips_elf_section_data): New.
(mips_elf_section_data): Define. Use throughout.
(_bfd_mips_elf_new_section_hook): New function.
(mips_elf_create_got_section): Don't alloc used_by_bfd.
* elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
* elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
opcodes/ChangeLog
* sh64-dis.c: Include elf32-sh64.h.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
gas/ChangeLog
* config/tc-sh64.c (shmedia_frob_section_type): Adjust for changed
sh64_elf_section_data.
* config/tc-sh64.h: Include elf32-sh64.h.
* config/tc-m68hc11.c: Don't include stdio.h.
(md_show_usage): Fix missing continuation.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
ld/ChangeLog
* emultempl/sh64elf.em: Include elf32-sh64.h.
(sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
sh64_elf_section_data.
(sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
2003-01-23 11:51:35 +00:00
Nick Clifton
489d0400af
Remove an extra "i" in --dll-search-prefix.
...
Move a cross-80th-column-margin "an" to the next line.
2003-01-23 09:30:44 +00:00
Andreas Jaeger
ae42d3a94d
* emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Do not
...
skip ':'.
2003-01-17 10:36:49 +00:00
Daniel Jacobowitz
9c8ebd6a51
* Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
...
* Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
(GENSCRIPTS): Add @use_sysroot@.
* Makefile.in: Regenerated.
* configure.host: Move setting of NATIVE_LIB_DIRS to...
* configure.tgt: ... here. Use ${target} instead of ${host}
for NATIVE_LIB_DIRS.
* configure.in: Add --with-sysroot.
* configure: Regenerated.
* genscripts.sh: Accept use_sysroot option. Set new variables
NATIVE and USE_LIBPATH. Prepend "=" to directory names if
$use_sysroot. Don't search $tool_lib if $use_sysroot.
* ldfile.c (ldfile_add_library_path): Handle leading '='.
* ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
(ld_sysroot): New variable.
(main): Initialize ld_sysroot.
* ldmain.h (ld_sysroot): New extern.
* emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
searching $EMULATION_LIBPATH.
(gld${EMULATION_NAME}_add_sysroot): New function.
(gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
(gld${EMULATION_NAME}_after_open): Likewise. Only search
environment variables if $NATIVE.
* ld.texinfo (Options): Mention "=" prefix in the description of -L.
* NEWS: Mention --with-sysroot.
* emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
instead of setting LIB_PATH.
* emulparams/elf32ppc.sh: Likewise.
* emulparams/elf64_s390.sh: Likewise.
* emulparams/elf64_sparc.sh: Likewise.
* emulparams/elf64ppc.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.
* emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
* emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
2003-01-06 16:14:01 +00:00
Nick Clifton
4cd898632a
Don't search for data import when auto-import is disabled.
2002-12-17 12:16:38 +00:00
Nick Clifton
2a8ac465c4
Use LD_PATHMAX+1 to account for trailing '\0'.
2002-12-17 11:01:25 +00:00
Nick Clifton
a08a0d635b
Duplicate entry for --compact-implib so that it is not confused with -c.
2002-12-17 10:03:52 +00:00
Nick Clifton
939ba9d0fc
Add support to skip import libraries for performance reasons and instead
...
use the direct auto-import of dll's
2002-12-16 18:02:16 +00:00
Alan Modra
1e5e54006d
* emultempl/elf32.em (struct orphan_save): Add os_tail field.
...
(gld${EMULATION_NAME}_place_orphan): Re-order output_section_statement
list too.
2002-12-10 03:34:43 +00:00
Alan Modra
36478e9d6f
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
...
load_base for orphans that follow a section with load_base set.
2002-12-04 23:56:14 +00:00
Alan Modra
b34976b65a
s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
...
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
2002-11-30 08:39:46 +00:00
Nick Clifton
2fa9fc65a5
Add --enable-auto-import extension.
2002-11-14 18:03:17 +00:00
Alan Modra
836c6af1fd
* emultempl/ppc64elf.em (ppc_before_allocation): New function.
...
(LDEMUL_BEFORE_ALLOCATION): Define.
(gld${EMULATION_NAME}_finish): Run discard_info for relocatable
linking.
* emultemp/hppaelf.em ((gld${EMULATION_NAME}_finish): Likewise.
2002-11-12 07:56:38 +00:00
Nick Clifton
c9e3887989
Adds support for fastcall symbols as used on Microsoft Windows platforms
...
(i386)
2002-11-06 19:36:20 +00:00
Daniel Jacobowitz
df2a731323
* emultempl/aix.em: Use include <> for generated headers.
...
* emultempl/beos.em: Likewise.
* emultempl/elf32.em: Likewise.
* emultempl/pe.em: Likewise.
* ldctor.c: Likewise.
* ldexp.c: Likewise.
* ldfile.c: Likewise.
* ldlang.c: Likewise.
* ldlex.c: Likewise.
* ldlex.l: Likewise.
* ldmain.c: Likewise.
* ldmisc.c: Likewise.
* ldwrite.c: Likewise.
* lexsup.c: Likewise.
* mri.c: Likewise.
* pe-dll.c: Likewise.
2002-10-30 03:57:39 +00:00
Jakub Jelinek
a8927cfd1a
* emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
...
sections into .rel{,a}.dyn.
2002-10-23 20:13:01 +00:00
Alan Modra
24cdb50ae8
* emultempl/elf32.em (output_rel_find): Prefer .rel script sections
...
when orphan is .rel, .rela when orphan is .rela.
(gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
first. Remove outsecname var.
2002-10-10 02:52:27 +00:00
Alan Modra
ba49312244
* emultempl/elf32.em (output_rel_find): Always place orphan loadable
...
reloc sections just before .rel.plt/.rela.plt.
(gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
Only put loadable reloc sections in hold_rel.
2002-09-30 03:34:46 +00:00
Alan Modra
c89e8944a4
* emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
...
strtoul and strtoull with bfd_scan_vma.
(gld${EMULATION_NAME}_read_file): Likewise.
2002-08-28 01:55:46 +00:00
Nick Clifton
88f7bcd5a7
Revert ARM linker patch and apply similar patch to bfd instead
2002-08-27 11:01:55 +00:00
Nick Clifton
d9a7f7ab85
Set the last bit of DT_INIT and DT_FINI depending on the type of the function.
2002-08-22 19:11:51 +00:00
Nick Clifton
2004afbc1d
Only search for an interworking bfd if there are input bfds.
2002-08-07 15:22:41 +00:00
Alan Modra
7fc44b9cd6
* emultempl/aix.em (gld*_before_parse): Set default arch. Reverts
...
2002-05-10 change.
2002-08-06 11:40:30 +00:00
Nick Clifton
f7c33884fa
Add new field to bfd_link structure and use it to control how common symbols
...
are extracted from archives.
2002-07-31 12:50:09 +00:00
Alan Modra
25844aaec2
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
...
bomb on /DISCARD/ input section.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* emultempl/mmo.em (mmo_place_orphan): Likewise.
2002-07-20 13:41:11 +00:00
Hans-Peter Nilsson
3595bd6e74
* emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
...
output section.
2002-07-19 02:56:59 +00:00
Alan Modra
e3e942e990
* ldlang.h (entry_sym): Make it a struct bfd_sym_chain.
...
* ldlang.c (entry_sym): Likewise.
(ldlang_undef_chain_list_type): Likewise.
(lang_finish): Adjust references to entry_symbol.
(lang_add_entry): Likewise.
(lang_gc_sections): Use link_info.gc_sym_list.
(lang_process): Set link_info.gc_sym_list.
* ldlex.l: Include bfdlink.h.
* ldmain.c (main): Init link_info.gc_sym_list.
* emultempl/aix.em: Adjust references to entry_symbol.
* emultempl/armcoff.em: Likewise.
* emultempl/armelf.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/ppc64elf.em (ppc_after_open): New function.
(LDEMUL_AFTER_OPEN): Define.
* emulparams/elf64ppc.sh: KEEP .opd sections.
2002-07-01 08:07:31 +00:00
Chris Demetriou
7d0a848ef9
2002-06-18 Chris Demetriou <cgd@broadcom.com>
...
* emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
section flags for SEC_DATA, rather than for SEC_CODE being unset.
2002-06-19 05:34:56 +00:00
Chris Demetriou
8505f88407
2002-06-18 Chris Demetriou <cgd@broadcom.com>
...
* emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Fix
format specifier used to print BFD name.
2002-06-19 01:52:52 +00:00
Tom Rix
8243435612
Fix ld segfault for some elf targets. Fix default layout for d10v.
2002-06-17 14:08:40 +00:00
H.J. Lu
c4bb8067a5
2002-06-12 H.J. Lu <hjl@gnu.org>
...
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
false if xvec doesn't match.
2002-06-13 02:43:23 +00:00
Alan Modra
eb95bb9a4e
* emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
2002-06-07 15:09:21 +00:00
Nick Clifton
e0076ab314
Enable pei386_auto_import by default. Only print a info message about auto
...
imports being resilved if this feature was not requested via a command line
switch.
2002-06-07 14:56:01 +00:00
Alan Modra
1d475d825e
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
...
SEC_EXCLUDE sections when doing a relocatable link.
2002-06-05 14:07:29 +00:00
Nick Clifton
8afb0e028c
Fix genreation of arm <->thumb glue stubs by ensuring that they are in the last section linked.
2002-05-29 16:03:04 +00:00
Richard Sandiford
ee3cc2e2ee
* ldlang.c (lang_size_sections_1): Move check for conflicting load
...
addresses and regions from here...
(lang_get_regions): ...to this new function.
(lang_leave_output_section_statement): Use lang_get_regions.
(lang_leave_overlay): Likewise.
* mri.c (mri_draw_tree): Pass null as last argument to
lang_leave_output_section_statement.
* emultempl/elf32.em (gld*_place_orphan): Likewise.
* emultempl/mmo.em (mmo_place_orphan): Likewise.
* emultempl/pe.em (gld*_place_orphan): Likewise.
2002-05-27 08:22:08 +00:00
Christopher Faylor
70b0be7903
* pe-dll.c (autofilter_liblist): Add more system libs excluded by default.
...
(autofilter_objlist): Add crtbegin.o, crtend.o.
* emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
(longopts): Add new option --exclude-libs.
(gld_${EMULATION_NAME}_list_options): Give quick help about it.
(gld_${EMULATION_NAME}_parse_args): Use it.
* pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
* pe-dll.c (exclude_list_struct): Add field type to distinguish symbols from
whole archives.
(pe_dll_add_excludes): Set excludes->type.
(auto_export): Add new variable libname and set to archive basename if abfd.
Use it when filtering default and user-specified libarary excludes. Let string
"ALL" mean all libs when filtering user-specified libs.
* ld.texinfo: Document --exclude-libs.
2002-05-22 18:03:09 +00:00
Alan Modra
fac1652d6b
* ldemul.c (ldemul_new_vers_pattern): New function.
...
* ldemul.h (ldemul_new_vers_pattern): Declare.
(struct ld_emulation_xfer_struct): Add new_vers_pattern.
* ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
* emultempl/ppc64elf.em (dotsyms): New static var.
(gld${EMULATION_NAME}_new_vers_pattern): New function.
(LDEMUL_NEW_VERS_PATTERN): Define.
(PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
(PARSE_AND_LIST_LONGOPTS): Likewise.
(PARSE_AND_LIST_ARGS_CASES): Handle them.
* emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
initialiser.
* emultempl/armcoff.em: Likewise.
* emultempl/armelf_oabi.em: Likewise.
* emultempl/beos.em: Likewise.
* emultempl/elf32.em: Likewise.
* emultempl/generic.em: Likewise.
* emultempl/gld960.em: Likewise.
* emultempl/gld960c.em: Likewise.
* emultempl/linux.em: Likewise.
* emultempl/lnk960.em: Likewise.
* emultempl/m68kcoff.em: Likewise.
* emultempl/mipsecoff.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/sunos.em: Likewise.
* emultempl/ticoff.em: Likewise.
* emultempl/vanilla.em: Likewise.
2002-05-22 09:04:48 +00:00
Alan Modra
54f24647c7
* emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
...
calling lang_add_entry.
2002-05-22 08:21:27 +00:00
H.J. Lu
aa713662e8
2002-05-21 H.J. Lu (hjl@gnu.org)
...
* emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
"-z muldefs".
(gld${EMULATION_NAME}_list_options): Add "-z muldefs".
* ld.texinfo: Updated for --allow-multiple-definition and
"-z muldefs".
* ldmain.c (main): Initialize the allow_multiple_definition
field to false.
* lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
(ld_options): Add --allow-multiple-definition.
(parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
2002-05-22 05:08:31 +00:00
Tom Rix
ca10c62d56
Add -bnortl and -bnortllib support for AIX.
2002-05-18 16:56:27 +00:00
Tom Rix
f1f0d9ab14
XCOFF64 fixes. For setting arch/mach and for R_BR relocations.
2002-05-10 21:20:16 +00:00
Alan Modra
a3d60be3b8
* emultempl/hppaelf.em (build_section_lists): New function.
...
(gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
and build_section_lists.
2002-05-04 02:06:43 +00:00
Alan Modra
805fc79928
* elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
...
(ppc64_elf_ha_reloc): New function.
(ppc64_elf_brtaken_reloc): New function.
(ppc64_elf_sectoff_reloc): New function.
(ppc64_elf_sectoff_ha_reloc): New function.
(ppc64_elf_toc_reloc): New function.
(ppc64_elf_toc_ha_reloc): New function.
(ppc64_elf_toc64_reloc): New function.
(ppc64_elf_unhandled_reloc): New function.
(ppc64_elf_howto_raw): Use the above.
<R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
<R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
<R_PPC64_SECTOFF_DS>: Likewise.
(IS_ABSOLUTE_RELOC): Update.
(struct ppc_link_hash_table): Add have_undefweak.
(ppc64_elf_link_hash_table_create): Init.
(func_desc_adjust): Set have_undefweak.
(ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
add the .sfpr blr when have_undefweak.
(ppc64_elf_setup_section_lists): Check hash table flavour.
(ppc64_elf_next_input_section): Move output_section->owner test to
ppc64elf.em.
(ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
and relocatable test. Return TOCstart and don't set elf_gp.
(ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
offset calculation. Add assert on weak sym branch tweaks.
* elf64-ppc.h (ppc64_elf_set_toc): Delete.
(ppc64_elf_toc): Declare.
(ppc64_elf_next_input_section): Update.
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
Adjust for ppc64_elf_set_toc change. #include libbfd.h.
(build_section_lists): Do output_section tests here.
2002-05-02 09:48:15 +00:00
Tom Rix
cc7e59b280
Formatting fix.
2002-05-01 02:52:17 +00:00
Alan Modra
9c1d81c102
Long branch stubs, multiple stub sections.
...
* emultempl/ppc64elf.em: Include ldctor.h.
(stub_file): New var.
(group_size): New var.
(ppc_create_output_section_statements): New function.
(struct hook_stub_info): New.
(hook_in_stub): New function.
(ppc_add_stub_section): New function.
(ppc_layout_sections_again): New function.
(build_section_lists): New function.
(gld${EMULATION_NAME}_finish): Rewrite.
(real_func): New var.
(ppc_for_each_input_file_wrapper): New function.
(ppc_lang_for_each_input_file): New function.
(lang_for_each_input_file): Define.
(PARSE_AND_LIST_PROLOGUE): Define.
(PARSE_AND_LIST_LONGOPTS): Define.
(PARSE_AND_LIST_OPTIONS): Define.
(PARSE_AND_LIST_ARGS_CASES): Define.
(LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
2002-05-01 02:34:54 +00:00
Tom Rix
aa67bccfe2
Add support for AIX -blibpath and -bnolibpath.
2002-04-30 23:29:21 +00:00
Nick Clifton
5835c2123d
Add 'n' in order to prevent "-n" from being taken as an abbreviation for
...
"--no-pipeline-knowledge".
2002-04-11 16:55:27 +00:00