diff options
author | Alexey Lapshin <alexey.lapshin@espressif.com> | 2023-02-23 10:48:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-02-23 10:48:16 +0000 |
commit | d273049e140ef324be2b018e235ae0ba8021a769 (patch) | |
tree | ccc28b159a04a0615ed33f217d4fe141fd6f4571 /bfd | |
parent | e0b74a85b879354d2aa1a6b5026d5de58c78ec45 (diff) | |
download | gdb-d273049e140ef324be2b018e235ae0ba8021a769.zip gdb-d273049e140ef324be2b018e235ae0ba8021a769.tar.gz gdb-d273049e140ef324be2b018e235ae0ba8021a769.tar.bz2 |
bfd: xtensa: fix __stop_SECTION literal drop
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elf32-xtensa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 84ff900..7772e2a 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -5230,6 +5230,13 @@ literal_value_equal (const literal_value *src1, (if undefined or weak). */ h1 = r_reloc_get_hash_entry (&src1->r_rel); h2 = r_reloc_get_hash_entry (&src2->r_rel); + + /* Keep start_stop literals always unique to avoid dropping it due to them + having late initialization. + Now they are equal because initialized with zeroed values. */ + if (h2 && h2->start_stop) + return false; + if (r_reloc_is_defined (&src1->r_rel) && (final_static_link || ((!h1 || h1->root.type != bfd_link_hash_defweak) |