diff options
author | Luca Bacci <luca.bacci@outlook.com> | 2023-05-17 13:38:14 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-05-17 13:38:14 +0100 |
commit | 80d4e113d7b9af8a5a36e5ea4399bca86050784f (patch) | |
tree | a471fa8b0176805e795dd73a3a97b5af94630482 /bfd/libcoff-in.h | |
parent | 80b6c32f233ed28607643c4e4e4e2ee3399fdfd7 (diff) | |
download | binutils-gdb-80d4e113d7b9af8a5a36e5ea4399bca86050784f.tar.gz |
Decorated symbols in import libs (BUG 30421)
PR 30421
* cofflink.c (_decoration_hash_newfunc): New function. (_bfd_coff_link_hash_table_init): Call it.
* libcoff-in.h (struct coff_link_hash_table): Add decoration_hash field. (struct decoration_hash_entry): Declare. (_decoration_hash_newfunc): Prototype.
* libcoff.h: Regenerate.
* emultempl/pe.em (set_decoration): New function. (pe_fixup_stdcalls): Call the new function.
* emultempl/pep.em (set_decoration): New function. (pep_fixup_stdcalls): Call the new function.
* pe-dll.c (make_one): Check for decoated symbols.
Diffstat (limited to 'bfd/libcoff-in.h')
-rw-r--r-- | bfd/libcoff-in.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h index 9c5780bfcc0..24a950dedd4 100644 --- a/bfd/libcoff-in.h +++ b/bfd/libcoff-in.h @@ -290,6 +290,9 @@ struct coff_link_hash_table struct bfd_link_hash_table root; /* A pointer to information used to link stabs in sections. */ struct stab_info stab_info; + /* Hash table that maps undecorated names to their respective + * decorated coff_link_hash_entry as found in fixup_stdcalls */ + struct bfd_hash_table decoration_hash; }; struct coff_reloc_cookie @@ -321,6 +324,12 @@ struct coff_reloc_cookie #define coff_hash_table(p) ((struct coff_link_hash_table *) ((p)->hash)) +struct decoration_hash_entry +{ + struct bfd_hash_entry root; + struct bfd_link_hash_entry *decorated_link; +}; + /* Functions in coffgen.c. */ extern bfd_cleanup coff_object_p (bfd *); @@ -568,6 +577,8 @@ struct coff_section_alignment_entry unsigned int alignment_power; }; +extern struct bfd_hash_entry *_decoration_hash_newfunc + (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); extern bool _bfd_coff_link_hash_table_init |