diff options
author | Alan Modra <amodra@gmail.com> | 2014-08-12 10:43:33 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-08-12 20:47:36 +0930 |
commit | 4613510308cea27713e8c7424b2afee9b99f6226 (patch) | |
tree | 50a2534571a7e765830e335172d4f2fdfd6ff4fc /include/bfdlink.h | |
parent | 88d3f0870bdcb030d1b9f56f48e389860ff41918 (diff) | |
download | gdb-4613510308cea27713e8c7424b2afee9b99f6226.zip gdb-4613510308cea27713e8c7424b2afee9b99f6226.tar.gz gdb-4613510308cea27713e8c7424b2afee9b99f6226.tar.bz2 |
Change ld "notice" interface for better handling of indirect symbols
The main aim of this change was to have non_ir_ref set correctly on
new indirect symbols. I could have added a "copy" param to the "notice"
function, so that indirect symbols could be created in plugin_notice,
but it seemed cleaner to create indirect syms earlier and pass them
rather than "string" to "notice".
include/
* bfdlink.h (struct bfd_link_callbacks <notice>): Remove "string"
param, add "inh".
bfd/
* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
here when not calling the generic add_symbol function. Formatting.
Correct handling of indirect symbols. Update notice call.
* elflink.c (_bfd_elf_notice_as_needed): Update notice call.
* linker.c (_bfd_generic_link_add_one_symbol): Create indirect
symbols early. Update notice call. Add comments regarding weak
symbols vs. indirect.
ld/
* ldmain.c (notice): Update args.
* plugin.c (plugin_notice): Likewise. Follow warning sym link.
Handle new indirect symbol.
Diffstat (limited to 'include/bfdlink.h')
-rw-r--r-- | include/bfdlink.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h index 58dba2a..125683d 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -640,15 +640,14 @@ struct bfd_link_callbacks (struct bfd_link_info *, const char *name, bfd *abfd, asection *section, bfd_vma address); /* A function which is called when a symbol in notice_hash is - defined or referenced. H is the symbol. ABFD, SECTION and - ADDRESS are the (new) value of the symbol. If SECTION is - bfd_und_section, this is a reference. FLAGS are the symbol - BSF_* flags. STRING is the name of the symbol to indirect to if - the sym is indirect, or the warning string if a warning sym. */ + defined or referenced. H is the symbol, INH the indirect symbol + if applicable. ABFD, SECTION and ADDRESS are the (new) value of + the symbol. If SECTION is bfd_und_section, this is a reference. + FLAGS are the symbol BSF_* flags. */ bfd_boolean (*notice) (struct bfd_link_info *, struct bfd_link_hash_entry *h, - bfd *abfd, asection *section, bfd_vma address, flagword flags, - const char *string); + struct bfd_link_hash_entry *inh, + bfd *abfd, asection *section, bfd_vma address, flagword flags); /* Error or warning link info message. */ void (*einfo) (const char *fmt, ...); |