diff options
author | Alan Modra <amodra@gmail.com> | 2002-07-01 08:07:31 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-07-01 08:07:31 +0000 |
commit | e3e942e9908d0fa4d4abf2b39edd99aa07a11535 (patch) | |
tree | 3838232535e0f8198173f06d9e8e023d4bf4906b /ld/emultempl | |
parent | 1e2f5b6e6b11ff65094876b8a8066a59a880a56d (diff) | |
download | gdb-e3e942e9908d0fa4d4abf2b39edd99aa07a11535.zip gdb-e3e942e9908d0fa4d4abf2b39edd99aa07a11535.tar.gz gdb-e3e942e9908d0fa4d4abf2b39edd99aa07a11535.tar.bz2 |
* 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.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/aix.em | 4 | ||||
-rw-r--r-- | ld/emultempl/armcoff.em | 8 | ||||
-rw-r--r-- | ld/emultempl/armelf.em | 6 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 10 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 13 |
5 files changed, 27 insertions, 14 deletions
diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index 3caa018..4388e05 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -9,7 +9,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* AIX emulation code for ${EMULATION_NAME} - Copyright 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001 + Copyright 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> AIX support by Ian Lance Taylor <ian@cygnus.com> @@ -682,7 +682,7 @@ gld${EMULATION_NAME}_before_allocation () /* Let the XCOFF backend set up the .loader section. */ if (!bfd_xcoff_size_dynamic_sections - (output_bfd, &link_info, libpath, entry_symbol, file_align, + (output_bfd, &link_info, libpath, entry_symbol.name, file_align, maxstack, maxdata, gc && !unix_ld ? true : false, modtype, textro ? true : false, unix_ld, special_sections, rtld ? true : false)) diff --git a/ld/emultempl/armcoff.em b/ld/emultempl/armcoff.em index c6a9895..0b5e7bc 100644 --- a/ld/emultempl/armcoff.em +++ b/ld/emultempl/armcoff.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com @@ -203,10 +203,10 @@ gld${EMULATION_NAME}_finish PARAMS((void)) sprintf_vma (buffer + 2, val); - if (entry_symbol != NULL && entry_from_cmdline) + if (entry_symbol.name != NULL && entry_from_cmdline) einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"), - thumb_entry_symbol, entry_symbol); - entry_symbol = buffer; + thumb_entry_symbol, entry_symbol.name); + entry_symbol.name = buffer; } else einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol); diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em index 77cd4f7..6f3cfc3 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -172,10 +172,10 @@ arm_elf_finish () sprintf_vma (buffer + 2, val); - if (entry_symbol != NULL && entry_from_cmdline) + if (entry_symbol.name != NULL && entry_from_cmdline) einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"), - thumb_entry_symbol, entry_symbol); - entry_symbol = buffer; + thumb_entry_symbol, entry_symbol.name); + entry_symbol.name = buffer; } else einfo (_("%P: warning: connot find thumb start symbol %s\n"), diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index b84a3c7..a6dfe46 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -758,8 +758,8 @@ gld_${EMULATION_NAME}_after_parse () opened, so registering the symbol as undefined will make a difference. */ - if (! link_info.relocateable && entry_symbol != NULL) - ldlang_add_undef (entry_symbol); + if (! link_info.relocateable && entry_symbol.name != NULL) + ldlang_add_undef (entry_symbol.name); } /* pe-dll.c directly accesses pe_data_import_dll, @@ -1418,10 +1418,10 @@ gld_${EMULATION_NAME}_finish () sprintf_vma (buffer + 2, val); - if (entry_symbol != NULL && entry_from_cmdline) + if (entry_symbol.name != NULL && entry_from_cmdline) einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"), - thumb_entry_symbol, entry_symbol); - entry_symbol = buffer; + thumb_entry_symbol, entry_symbol.name); + entry_symbol.name = buffer; } else einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol); diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 9ce7893..cf6918e 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -42,6 +42,7 @@ static bfd_signed_vma group_size = 1; static int dotsyms = 1; static void ppc_create_output_section_statements PARAMS ((void)); +static void ppc_after_open PARAMS ((void)); static asection *ppc_add_stub_section PARAMS ((const char *, asection *)); static void ppc_layout_sections_again PARAMS ((void)); static void gld${EMULATION_NAME}_after_allocation PARAMS ((void)); @@ -71,6 +72,17 @@ ppc_create_output_section_statements () ldlang_add_file (stub_file); } +static void +ppc_after_open () +{ + if (!ppc64_elf_mark_entry_syms (&link_info)) + { + einfo ("%X%P: can not mark entry symbols %E\n"); + return; + } + + gld${EMULATION_NAME}_after_open (); +} struct hook_stub_info { @@ -473,6 +485,7 @@ PARSE_AND_LIST_ARGS_CASES=' # Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation # +LDEMUL_AFTER_OPEN=ppc_after_open LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation LDEMUL_FINISH=gld${EMULATION_NAME}_finish LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=ppc_create_output_section_statements |