mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 10:03:47 +08:00
Fix ld --just-symbols
* aix5ppc-core.c: Warning fixes. * aout-adobe.c (aout_32_bfd_link_just_syms): Define. * aout-target.h (MY_bfd_link_just_syms): Define. * aout-tic30.c (MY_bfd_link_just_syms): Define. * bfd.c (bfd_link_just_syms): Define. * binary.c (binary_bfd_link_just_syms): Define. * bout.c (b_out_bfd_link_just_syms): Define. * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer. * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise. * coffcode.h (coff_bfd_link_just_syms): Define. * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS. (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS. (_bfd_elf_link_just_syms): Declare. * elf.c (_bfd_elf_link_just_syms): New function. * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that sections haven't already been discarded by the linker. * elflink.h (elf_link_add_object_symbols): Likewise for stab sections and SEC_MERGE sections. (elf_bfd_discard_info): Similarly here. * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define. * i386msdos.c (msdos_bfd_link_just_syms): Define. * i386os9k.c (os9k_bfd_link_just_syms): Define. * ieee.c (ieee_bfd_link_just_syms): Define. * ihex.c (ihex_bfd_link_just_syms): Define. * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define. (_bfd_generic_link_just_syms): Declare. * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define. * linker.c (_bfd_generic_link_just_syms): New function. * mmo.c (mmo_bfd_link_just_syms): Define. * nlm-target.h (nlm_bfd_link_just_syms): Define. * oasys.c (oasys_bfd_link_just_syms): Define. * ppcboot.c (ppcboot_bfd_link_just_syms): Define. * som.c (som_bfd_link_just_syms): Define. * srec.c (srec_bfd_link_just_syms): Define. * targets.c (struct bfd_target): Add _bfd_link_just_syms. (BFD_JUMP_TABLE_LINK): And here. * tekhex.c (tekhex_bfd_link_just_syms): Define. * versados.c (versados_bfd_link_just_syms): Define. * vms.c (vms_bfd_link_just_syms): Define. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate.
This commit is contained in:
parent
0e0cbfbfde
commit
2d653fc760
@ -1,3 +1,47 @@
|
||||
2002-05-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* aix5ppc-core.c: Warning fixes.
|
||||
* aout-adobe.c (aout_32_bfd_link_just_syms): Define.
|
||||
* aout-target.h (MY_bfd_link_just_syms): Define.
|
||||
* aout-tic30.c (MY_bfd_link_just_syms): Define.
|
||||
* bfd.c (bfd_link_just_syms): Define.
|
||||
* binary.c (binary_bfd_link_just_syms): Define.
|
||||
* bout.c (b_out_bfd_link_just_syms): Define.
|
||||
* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
|
||||
* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
|
||||
* coffcode.h (coff_bfd_link_just_syms): Define.
|
||||
* elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
|
||||
(elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
|
||||
(_bfd_elf_link_just_syms): Declare.
|
||||
* elf.c (_bfd_elf_link_just_syms): New function.
|
||||
* elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
|
||||
sections haven't already been discarded by the linker.
|
||||
* elflink.h (elf_link_add_object_symbols): Likewise for stab
|
||||
sections and SEC_MERGE sections.
|
||||
(elf_bfd_discard_info): Similarly here.
|
||||
* elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
|
||||
* i386msdos.c (msdos_bfd_link_just_syms): Define.
|
||||
* i386os9k.c (os9k_bfd_link_just_syms): Define.
|
||||
* ieee.c (ieee_bfd_link_just_syms): Define.
|
||||
* ihex.c (ihex_bfd_link_just_syms): Define.
|
||||
* libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
|
||||
(_bfd_generic_link_just_syms): Declare.
|
||||
* libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
|
||||
* linker.c (_bfd_generic_link_just_syms): New function.
|
||||
* mmo.c (mmo_bfd_link_just_syms): Define.
|
||||
* nlm-target.h (nlm_bfd_link_just_syms): Define.
|
||||
* oasys.c (oasys_bfd_link_just_syms): Define.
|
||||
* ppcboot.c (ppcboot_bfd_link_just_syms): Define.
|
||||
* som.c (som_bfd_link_just_syms): Define.
|
||||
* srec.c (srec_bfd_link_just_syms): Define.
|
||||
* targets.c (struct bfd_target): Add _bfd_link_just_syms.
|
||||
(BFD_JUMP_TABLE_LINK): And here.
|
||||
* tekhex.c (tekhex_bfd_link_just_syms): Define.
|
||||
* versados.c (versados_bfd_link_just_syms): Define.
|
||||
* vms.c (vms_bfd_link_just_syms): Define.
|
||||
* libbfd.h: Regenerate.
|
||||
* bfd-in2.h: Regenerate.
|
||||
|
||||
2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
||||
|
||||
* elf32-mips.c: Remove superfluous definitions copied from
|
||||
|
@ -328,7 +328,7 @@ int xcoff64_core_file_failing_signal PARAMS ((bfd *));
|
||||
|
||||
const bfd_target *
|
||||
xcoff64_core_p (abfd)
|
||||
bfd *abfd;
|
||||
bfd *abfd ATTRIBUTE_UNUSED;
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return 0;
|
||||
@ -336,22 +336,22 @@ xcoff64_core_p (abfd)
|
||||
|
||||
boolean
|
||||
xcoff64_core_file_matches_executable_p (core_bfd, exec_bfd)
|
||||
bfd *core_bfd;
|
||||
bfd *exec_bfd;
|
||||
bfd *core_bfd ATTRIBUTE_UNUSED;
|
||||
bfd *exec_bfd ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char *
|
||||
xcoff64_core_file_failing_command (abfd)
|
||||
bfd *abfd;
|
||||
bfd *abfd ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
xcoff64_core_file_failing_signal (abfd)
|
||||
bfd *abfd;
|
||||
bfd *abfd ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -515,6 +515,7 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore)
|
||||
#define aout_32_bfd_link_hash_table_free \
|
||||
_bfd_generic_link_hash_table_free
|
||||
#define aout_32_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define aout_32_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define aout_32_bfd_final_link _bfd_generic_final_link
|
||||
#define aout_32_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -534,6 +534,9 @@ MY_bfd_final_link (abfd, info)
|
||||
#ifndef MY_bfd_link_add_symbols
|
||||
#define MY_bfd_link_add_symbols NAME(aout,link_add_symbols)
|
||||
#endif
|
||||
#ifndef MY_bfd_link_just_syms
|
||||
#define MY_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#endif
|
||||
#ifndef MY_bfd_link_split_section
|
||||
#define MY_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#endif
|
||||
|
@ -986,6 +986,9 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
|
||||
#ifndef MY_bfd_link_add_symbols
|
||||
#define MY_bfd_link_add_symbols NAME(aout,link_add_symbols)
|
||||
#endif
|
||||
#ifndef MY_bfd_link_just_syms
|
||||
#define MY_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#endif
|
||||
#ifndef MY_bfd_link_split_section
|
||||
#define MY_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#endif
|
||||
|
@ -3510,6 +3510,9 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
|
||||
#define bfd_link_add_symbols(abfd, info) \
|
||||
BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
|
||||
|
||||
#define bfd_link_just_syms(sec, info) \
|
||||
BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
|
||||
|
||||
#define bfd_final_link(abfd, info) \
|
||||
BFD_SEND (abfd, _bfd_final_link, (abfd, info))
|
||||
|
||||
@ -3834,6 +3837,7 @@ CONCAT2 (NAME,_bfd_relax_section), \
|
||||
CONCAT2 (NAME,_bfd_link_hash_table_create), \
|
||||
CONCAT2 (NAME,_bfd_link_hash_table_free), \
|
||||
CONCAT2 (NAME,_bfd_link_add_symbols), \
|
||||
CONCAT2 (NAME,_bfd_link_just_syms), \
|
||||
CONCAT2 (NAME,_bfd_final_link), \
|
||||
CONCAT2 (NAME,_bfd_link_split_section), \
|
||||
CONCAT2 (NAME,_bfd_gc_sections), \
|
||||
@ -3856,6 +3860,9 @@ CONCAT2 (NAME,_bfd_merge_sections)
|
||||
/* Add symbols from this object file into the hash table. */
|
||||
boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
||||
/* Indicate that we are only retrieving symbol values from this section. */
|
||||
void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *));
|
||||
|
||||
/* Do a link based on the link_order structures attached to each
|
||||
section of the BFD. */
|
||||
boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
@ -1195,6 +1195,9 @@ DESCRIPTION
|
||||
.#define bfd_link_add_symbols(abfd, info) \
|
||||
. BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
|
||||
.
|
||||
.#define bfd_link_just_syms(sec, info) \
|
||||
. BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
|
||||
.
|
||||
.#define bfd_final_link(abfd, info) \
|
||||
. BFD_SEND (abfd, _bfd_final_link, (abfd, info))
|
||||
.
|
||||
|
@ -339,6 +339,7 @@ binary_sizeof_headers (abfd, exec)
|
||||
#define binary_bfd_merge_sections bfd_generic_merge_sections
|
||||
#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define binary_bfd_final_link _bfd_generic_final_link
|
||||
#define binary_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
@ -1451,6 +1451,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
|
||||
#define b_out_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define b_out_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define b_out_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define b_out_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define b_out_bfd_final_link _bfd_generic_final_link
|
||||
#define b_out_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#define b_out_bfd_gc_sections bfd_generic_gc_sections
|
||||
|
@ -4167,7 +4167,8 @@ const bfd_target rs6000coff_vec =
|
||||
_bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */
|
||||
_bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
|
||||
_bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */
|
||||
_bfd_generic_link_just_syms, /* _bfd_link_just_syms */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_final_link */
|
||||
_bfd_generic_link_split_section, /* _bfd_link_split_section */
|
||||
bfd_generic_gc_sections, /* _bfd_gc_sections */
|
||||
bfd_generic_merge_sections, /* _bfd_merge_sections */
|
||||
@ -4428,7 +4429,8 @@ const bfd_target pmac_xcoff_vec =
|
||||
_bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */
|
||||
_bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
|
||||
_bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */
|
||||
_bfd_generic_link_just_syms, /* _bfd_link_just_syms */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_final_link */
|
||||
_bfd_generic_link_split_section, /* _bfd_link_split_section */
|
||||
bfd_generic_gc_sections, /* _bfd_gc_sections */
|
||||
bfd_generic_merge_sections, /* _bfd_merge_sections */
|
||||
|
@ -2712,7 +2712,8 @@ const bfd_target rs6000coff64_vec =
|
||||
_bfd_xcoff_bfd_link_hash_table_create,/* _bfd_link_hash_table_create */
|
||||
_bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
|
||||
_bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */
|
||||
_bfd_generic_link_just_syms, /* _bfd_link_just_syms */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_final_link */
|
||||
_bfd_generic_link_split_section, /* _bfd_link_split_section */
|
||||
bfd_generic_gc_sections, /* _bfd_gc_sections */
|
||||
bfd_generic_merge_sections, /* _bfd_merge_sections */
|
||||
@ -2964,7 +2965,8 @@ const bfd_target aix5coff64_vec =
|
||||
_bfd_xcoff_bfd_link_hash_table_create,/* _bfd_link_hash_table_create */
|
||||
_bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
|
||||
_bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */
|
||||
_bfd_generic_link_just_syms, /* _bfd_link_just_syms */
|
||||
_bfd_xcoff_bfd_final_link, /* _bfd_final_link */
|
||||
_bfd_generic_link_split_section, /* _bfd_link_split_section */
|
||||
bfd_generic_gc_sections, /* _bfd_gc_sections */
|
||||
bfd_generic_merge_sections, /* _bfd_merge_sections */
|
||||
|
@ -5175,6 +5175,7 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
|
||||
#define coff_bfd_final_link _bfd_generic_final_link
|
||||
#endif /* ! defined (coff_relocate_section) */
|
||||
|
||||
#define coff_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define coff_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
#ifndef coff_start_final_link
|
||||
|
@ -230,6 +230,7 @@ enum elf_link_info_type
|
||||
ELF_INFO_TYPE_MERGE,
|
||||
ELF_INFO_TYPE_EH_FRAME,
|
||||
ELF_INFO_TYPE_EH_FRAME_HDR,
|
||||
ELF_INFO_TYPE_JUST_SYMS,
|
||||
ELF_INFO_TYPE_LAST
|
||||
};
|
||||
|
||||
@ -908,7 +909,8 @@ struct bfd_elf_section_data
|
||||
#define elf_discarded_section(sec) \
|
||||
(!bfd_is_abs_section(sec) \
|
||||
&& bfd_is_abs_section((sec)->output_section) \
|
||||
&& elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE)
|
||||
&& elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
|
||||
&& elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
|
||||
|
||||
#define get_elf_backend_data(abfd) \
|
||||
((struct elf_backend_data *) (abfd)->xvec->backend_data)
|
||||
@ -1226,10 +1228,10 @@ extern boolean _bfd_elf_link_hash_table_init
|
||||
const char *)));
|
||||
extern boolean _bfd_elf_slurp_version_tables
|
||||
PARAMS ((bfd *));
|
||||
|
||||
extern boolean _bfd_elf_merge_sections
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
||||
extern void _bfd_elf_link_just_syms
|
||||
PARAMS ((asection *, struct bfd_link_info *));
|
||||
extern boolean _bfd_elf_copy_private_symbol_data
|
||||
PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
|
||||
extern boolean _bfd_elf_copy_private_section_data
|
||||
|
@ -787,7 +787,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info)
|
||||
struct eh_frame_hdr_info *hdr_info;
|
||||
|
||||
sec = bfd_get_section_by_name (elf_hash_table (info)->dynobj, ".eh_frame_hdr");
|
||||
if (sec == NULL)
|
||||
if (sec == NULL || bfd_is_abs_section (sec->output_section))
|
||||
return true;
|
||||
|
||||
hdr_info
|
||||
@ -805,7 +805,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info)
|
||||
/* Count only sections which have at least a single CIE or FDE.
|
||||
There cannot be any CIE or FDE <= 8 bytes. */
|
||||
o = bfd_get_section_by_name (abfd, ".eh_frame");
|
||||
if (o && o->_raw_size > 8)
|
||||
if (o && o->_raw_size > 8 && !bfd_is_abs_section (o->output_section))
|
||||
break;
|
||||
}
|
||||
|
||||
|
13
bfd/elf.c
13
bfd/elf.c
@ -814,6 +814,19 @@ _bfd_elf_merge_sections (abfd, info)
|
||||
merge_sections_remove_hook);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
_bfd_elf_link_just_syms (sec, info)
|
||||
asection *sec;
|
||||
struct bfd_link_info *info;
|
||||
{
|
||||
sec->output_section = bfd_abs_section_ptr;
|
||||
sec->output_offset = sec->vma;
|
||||
if (!is_elf_hash_table (info))
|
||||
return;
|
||||
|
||||
elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_JUST_SYMS;
|
||||
}
|
||||
|
||||
/* Copy the program header and other data from one object module to
|
||||
another. */
|
||||
|
@ -2258,7 +2258,9 @@ elf_link_add_object_symbols (abfd, info)
|
||||
asection *stab, *stabstr;
|
||||
|
||||
stab = bfd_get_section_by_name (abfd, ".stab");
|
||||
if (stab != NULL && !(stab->flags & SEC_MERGE))
|
||||
if (stab != NULL
|
||||
&& (stab->flags & SEC_MERGE) == 0
|
||||
&& !bfd_is_abs_section (stab->output_section))
|
||||
{
|
||||
stabstr = bfd_get_section_by_name (abfd, ".stabstr");
|
||||
|
||||
@ -2284,7 +2286,8 @@ elf_link_add_object_symbols (abfd, info)
|
||||
asection *s;
|
||||
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
if (s->flags & SEC_MERGE)
|
||||
if ((s->flags & SEC_MERGE) != 0
|
||||
&& !bfd_is_abs_section (s->output_section))
|
||||
{
|
||||
struct bfd_elf_section_data *secdata;
|
||||
|
||||
@ -8267,11 +8270,19 @@ elf_bfd_discard_info (output_bfd, info)
|
||||
if (ehdr)
|
||||
{
|
||||
eh = bfd_get_section_by_name (abfd, ".eh_frame");
|
||||
if (eh && eh->_raw_size == 0)
|
||||
if (eh && (eh->_raw_size == 0
|
||||
|| bfd_is_abs_section (eh->output_section)))
|
||||
eh = NULL;
|
||||
}
|
||||
|
||||
stab = strip ? NULL : bfd_get_section_by_name (abfd, ".stab");
|
||||
stab = NULL;
|
||||
if (!strip)
|
||||
{
|
||||
stab = bfd_get_section_by_name (abfd, ".stab");
|
||||
if (stab && (stab->_raw_size == 0
|
||||
|| bfd_is_abs_section (stab->output_section)))
|
||||
stab = NULL;
|
||||
}
|
||||
if ((! stab
|
||||
|| elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS)
|
||||
&& ! eh
|
||||
|
@ -194,6 +194,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#define bfd_elfNN_bfd_final_link _bfd_generic_final_link
|
||||
#endif
|
||||
#endif /* ! defined (elf_backend_relocate_section) */
|
||||
|
||||
#ifndef bfd_elfNN_bfd_link_just_syms
|
||||
#define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms
|
||||
#endif
|
||||
|
||||
#ifndef bfd_elfNN_bfd_link_split_section
|
||||
#define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#endif
|
||||
|
@ -176,6 +176,7 @@ msdos_set_section_contents (abfd, section, location, offset, count)
|
||||
#define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define msdos_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define msdos_bfd_final_link _bfd_generic_final_link
|
||||
#define msdos_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#define msdos_set_arch_mach _bfd_generic_set_arch_mach
|
||||
|
@ -332,6 +332,7 @@ os9k_sizeof_headers (ignore_abfd, ignore)
|
||||
#define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define os9k_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define os9k_bfd_final_link _bfd_generic_final_link
|
||||
#define os9k_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -4013,6 +4013,7 @@ ieee_bfd_debug_info_accumulate (abfd, section)
|
||||
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define ieee_bfd_final_link _bfd_generic_final_link
|
||||
#define ieee_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -980,6 +980,7 @@ ihex_sizeof_headers (abfd, exec)
|
||||
#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define ihex_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define ihex_bfd_final_link _bfd_generic_final_link
|
||||
#define ihex_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -328,6 +328,8 @@ extern boolean _bfd_generic_set_section_contents
|
||||
((void (*) PARAMS ((struct bfd_link_hash_table *))) bfd_void)
|
||||
#define _bfd_nolink_bfd_link_add_symbols \
|
||||
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
|
||||
#define _bfd_nolink_bfd_link_just_syms \
|
||||
((void (*) PARAMS ((asection *, struct bfd_link_info *))) bfd_void)
|
||||
#define _bfd_nolink_bfd_final_link \
|
||||
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
|
||||
#define _bfd_nolink_bfd_link_split_section \
|
||||
@ -410,8 +412,6 @@ extern boolean _bfd_generic_link_add_archive_symbols
|
||||
PARAMS ((bfd *, struct bfd_link_info *,
|
||||
boolean (*checkfn) (bfd *, struct bfd_link_info *, boolean *)));
|
||||
|
||||
|
||||
|
||||
/* Forward declaration to avoid prototype errors. */
|
||||
typedef struct bfd_link_hash_entry _bfd_link_hash_entry;
|
||||
|
||||
@ -421,6 +421,10 @@ extern boolean _bfd_generic_link_add_one_symbol
|
||||
asection *, bfd_vma, const char *, boolean copy,
|
||||
boolean constructor, struct bfd_link_hash_entry **));
|
||||
|
||||
/* Generic routine to mark section as supplying symbols only. */
|
||||
extern void _bfd_generic_link_just_syms
|
||||
PARAMS ((asection *, struct bfd_link_info *));
|
||||
|
||||
/* Generic link routine. */
|
||||
extern boolean _bfd_generic_final_link
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
@ -333,6 +333,8 @@ extern boolean _bfd_generic_set_section_contents
|
||||
((void (*) PARAMS ((struct bfd_link_hash_table *))) bfd_void)
|
||||
#define _bfd_nolink_bfd_link_add_symbols \
|
||||
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
|
||||
#define _bfd_nolink_bfd_link_just_syms \
|
||||
((void (*) PARAMS ((asection *, struct bfd_link_info *))) bfd_void)
|
||||
#define _bfd_nolink_bfd_final_link \
|
||||
((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
|
||||
#define _bfd_nolink_bfd_link_split_section \
|
||||
@ -415,8 +417,6 @@ extern boolean _bfd_generic_link_add_archive_symbols
|
||||
PARAMS ((bfd *, struct bfd_link_info *,
|
||||
boolean (*checkfn) (bfd *, struct bfd_link_info *, boolean *)));
|
||||
|
||||
|
||||
|
||||
/* Forward declaration to avoid prototype errors. */
|
||||
typedef struct bfd_link_hash_entry _bfd_link_hash_entry;
|
||||
|
||||
@ -426,6 +426,10 @@ extern boolean _bfd_generic_link_add_one_symbol
|
||||
asection *, bfd_vma, const char *, boolean copy,
|
||||
boolean constructor, struct bfd_link_hash_entry **));
|
||||
|
||||
/* Generic routine to mark section as supplying symbols only. */
|
||||
extern void _bfd_generic_link_just_syms
|
||||
PARAMS ((asection *, struct bfd_link_info *));
|
||||
|
||||
/* Generic link routine. */
|
||||
extern boolean _bfd_generic_final_link
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
@ -333,6 +333,7 @@ extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create
|
||||
#define _bfd_ecoff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
extern boolean _bfd_ecoff_bfd_link_add_symbols
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
#define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
extern boolean _bfd_ecoff_bfd_final_link
|
||||
PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
||||
|
13
bfd/linker.c
13
bfd/linker.c
@ -757,6 +757,19 @@ _bfd_generic_link_add_symbols_collect (abfd, info)
|
||||
return generic_link_add_symbols (abfd, info, true);
|
||||
}
|
||||
|
||||
/* Indicate that we are only retrieving symbol values from this
|
||||
section. We want the symbols to act as though the values in the
|
||||
file are absolute. */
|
||||
|
||||
void
|
||||
_bfd_generic_link_just_syms (sec, info)
|
||||
asection *sec;
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED;
|
||||
{
|
||||
sec->output_section = bfd_abs_section_ptr;
|
||||
sec->output_offset = sec->vma;
|
||||
}
|
||||
|
||||
/* Add symbols from an object file to the global hash table. */
|
||||
|
||||
static boolean
|
||||
|
@ -3247,6 +3247,7 @@ mmo_canonicalize_reloc (abfd, section, relptr, symbols)
|
||||
#define mmo_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define mmo_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define mmo_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define mmo_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define mmo_bfd_final_link _bfd_generic_final_link
|
||||
#define mmo_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -47,6 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define nlm_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define nlm_bfd_final_link _bfd_generic_final_link
|
||||
#define nlm_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -1493,6 +1493,7 @@ oasys_sizeof_headers (abfd, exec)
|
||||
#define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define oasys_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define oasys_bfd_final_link _bfd_generic_final_link
|
||||
#define oasys_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -472,6 +472,7 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
|
||||
#define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define ppcboot_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define ppcboot_bfd_final_link _bfd_generic_final_link
|
||||
#define ppcboot_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#define ppcboot_get_section_contents_in_window \
|
||||
|
@ -6335,6 +6335,7 @@ som_bfd_link_split_section (abfd, sec)
|
||||
#define som_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define som_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define som_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define som_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define som_bfd_final_link _bfd_generic_final_link
|
||||
|
||||
#define som_bfd_gc_sections bfd_generic_gc_sections
|
||||
|
@ -1273,6 +1273,7 @@ srec_print_symbol (abfd, afile, symbol, how)
|
||||
#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define srec_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define srec_bfd_final_link _bfd_generic_final_link
|
||||
#define srec_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -396,6 +396,7 @@ the tokens.
|
||||
.CONCAT2 (NAME,_bfd_link_hash_table_create), \
|
||||
.CONCAT2 (NAME,_bfd_link_hash_table_free), \
|
||||
.CONCAT2 (NAME,_bfd_link_add_symbols), \
|
||||
.CONCAT2 (NAME,_bfd_link_just_syms), \
|
||||
.CONCAT2 (NAME,_bfd_final_link), \
|
||||
.CONCAT2 (NAME,_bfd_link_split_section), \
|
||||
.CONCAT2 (NAME,_bfd_gc_sections), \
|
||||
@ -418,6 +419,9 @@ the tokens.
|
||||
. {* Add symbols from this object file into the hash table. *}
|
||||
. boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
|
||||
.
|
||||
. {* Indicate that we are only retrieving symbol values from this section. *}
|
||||
. void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *));
|
||||
.
|
||||
. {* Do a link based on the link_order structures attached to each
|
||||
. section of the BFD. *}
|
||||
. boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
|
||||
|
@ -1008,6 +1008,7 @@ tekhex_print_symbol (abfd, filep, symbol, how)
|
||||
#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define tekhex_bfd_final_link _bfd_generic_final_link
|
||||
#define tekhex_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -870,6 +870,7 @@ versados_canonicalize_reloc (abfd, section, relptr, symbols)
|
||||
#define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
|
||||
#define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define versados_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define versados_bfd_final_link _bfd_generic_final_link
|
||||
#define versados_bfd_link_split_section _bfd_generic_link_split_section
|
||||
|
||||
|
@ -132,6 +132,7 @@ static boolean vms_bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
|
||||
static boolean vms_bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
|
||||
|
||||
#define vms_make_empty_symbol _bfd_generic_make_empty_symbol
|
||||
#define vms_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
|
||||
/*===========================================================================*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user