diff options
author | Cl?ment Chigot <clement.chigot@atos.net> | 2021-04-22 15:31:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-04-22 15:31:02 +0100 |
commit | bdd2aaf69ea2e8c89f431bdf72516e2d6503891a (patch) | |
tree | e375a94197aab402fcd6aa091a7b0aff7cf304a5 /bfd/xcofflink.c | |
parent | 22f80c0f77be6304b9632827d8161e28cb4a195a (diff) | |
download | gdb-bdd2aaf69ea2e8c89f431bdf72516e2d6503891a.zip gdb-bdd2aaf69ea2e8c89f431bdf72516e2d6503891a.tar.gz gdb-bdd2aaf69ea2e8c89f431bdf72516e2d6503891a.tar.bz2 |
fix string table generation for XCOFF64 .debug section
bfd * hash.c (struct bfd_strtab_hash): Remove xcoff field.
Add length_field_size field.
(_bfd_stringtab_init): Change prototype.
Adapt to new length_field_size.
(_bfd_xcoff_stringtab_init): Likewise.
(_bfd_stringtab_add): Likewise.
(_bfd_stringtab_emit): Likewise.
* libbfd-in.h (_bfd_xcoff_stringtab_init):
Change prototype.
* libbfd.h: Regenerate.
* xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create):
Call _bfd_xcoff_stringtab_init with isxcoff64 value.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r-- | bfd/xcofflink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index 1607cd5..e18efd4 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -592,6 +592,7 @@ struct bfd_link_hash_table * _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) { struct xcoff_link_hash_table *ret; + bool isxcoff64 = false; size_t amt = sizeof (* ret); ret = bfd_zmalloc (amt); @@ -604,7 +605,9 @@ _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) return NULL; } - ret->debug_strtab = _bfd_xcoff_stringtab_init (); + isxcoff64 = bfd_coff_debug_string_prefix_length (abfd) == 4; + + ret->debug_strtab = _bfd_xcoff_stringtab_init (isxcoff64); ret->archive_info = htab_create (37, xcoff_archive_info_hash, xcoff_archive_info_eq, NULL); if (!ret->debug_strtab || !ret->archive_info) |