aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-04-24 10:02:14 +0000
committerAlan Modra <amodra@gmail.com>2011-04-24 10:02:14 +0000
commit35ed3f940bd08e98211807604672cccbf2741d8f (patch)
tree3156db0adf6192e4886956523e669ec350c1039b /include
parent90556b8c94aa9d89ee235b4b2a83aec9ec1dcde3 (diff)
downloadgdb-35ed3f940bd08e98211807604672cccbf2741d8f.zip
gdb-35ed3f940bd08e98211807604672cccbf2741d8f.tar.gz
gdb-35ed3f940bd08e98211807604672cccbf2741d8f.tar.bz2
PR ld/12365
PR ld/12696 include/ * bfdlink.h (ENUM_BITFIELD): Define. (struct bfd_link_hash_entry): Make "type" a bitfield. Add "non_ir_ref". (struct bfd_link_callbacks <notice>): Pass bfd_link_hash_entry pointer rather than "name". bfd/ * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call. * linker.c (_bfd_link_hash_newfunc): Clear bitfields. (_bfd_generic_link_add_one_symbol): Update "notice" call. * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when it is a redef of an IR symbol in a real BFD. ld/ * ldmain.c (notice): Delete "name" param, add "h". * plugin.c (plugin_notice): Likewise. Set non_ir_ref. Handle redefinitions of IR symbols in real BFDs. (plugin_multiple_definition, plugin_multiple_common): Delete. (non_ironly_hash, init_non_ironly_hash): Delete. (is_visible_from_outside): Traverse entry_symbol chain. (get_symbols): Use non_ir_ref flag rather than hash lookup.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog9
-rw-r--r--include/bfdlink.h16
2 files changed, 21 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index bf7128f..634b21c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,12 @@
+2011-04-24 Alan Modra <amodra@gmail.com>
+
+ PR ld/12365
+ PR ld/12696
+ * bfdlink.h (ENUM_BITFIELD): Define.
+ (struct bfd_link_hash_entry): Make "type" a bitfield. Add "non_ir_ref".
+ (struct bfd_link_callbacks <notice>): Pass bfd_link_hash_entry pointer
+ rather than "name".
+
2011-04-20 Alan Modra <amodra@gmail.com>
PR ld/12365
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 7cfaea0..4c649d9 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -24,6 +24,12 @@
#ifndef BFDLINK_H
#define BFDLINK_H
+#if (__GNUC__ * 1000 + __GNUC_MINOR__ > 2000)
+#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
+#else
+#define ENUM_BITFIELD(TYPE) unsigned int
+#endif
+
/* Which symbols to strip during a link. */
enum bfd_link_strip
{
@@ -91,7 +97,9 @@ struct bfd_link_hash_entry
struct bfd_hash_entry root;
/* Type of this entry. */
- enum bfd_link_hash_type type;
+ ENUM_BITFIELD (bfd_link_hash_type) type : 8;
+
+ unsigned int non_ir_ref : 1;
/* A union of information depending upon the type. */
union
@@ -570,11 +578,11 @@ 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. NAME is the symbol. ABFD, SECTION and
- ADDRESS are the value of the symbol. If SECTION 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. */
bfd_boolean (*notice)
- (struct bfd_link_info *, const char *name,
+ (struct bfd_link_info *, struct bfd_link_hash_entry *h,
bfd *abfd, asection *section, bfd_vma address);
/* Error or warning link info message. */
void (*einfo)