aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-04-14 15:21:50 +0100
committerNick Clifton <nickc@redhat.com>2020-04-14 15:21:50 +0100
commit34ca55313b8e6c0f6354f2dc5a3a35e38c32ae82 (patch)
treef094c889c5535ba1a73c24ce4acf3e5b13f212b0 /bfd
parent645f43a80c63c4116ddfe1e0371746a9418e823c (diff)
downloadgdb-34ca55313b8e6c0f6354f2dc5a3a35e38c32ae82.zip
gdb-34ca55313b8e6c0f6354f2dc5a3a35e38c32ae82.tar.gz
gdb-34ca55313b8e6c0f6354f2dc5a3a35e38c32ae82.tar.bz2
The assembler only supports 32-bit stabs. So set sh_entsize unconditionally to 12.
PR gas/25768 * elf.c (assign_section_numbers): Always set .stab sh_entsize to 12.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0ef3b2f..b89aced 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-14 Fangrui Song <maskray@google.com>
+
+ PR gas/25768
+ * elf.c (assign_section_numbers): Always set .stab sh_entsize to
+ 12.
+
2020-04-14 Stephen Casner <casner@acm.org>
PR ld/25677
diff --git a/bfd/elf.c b/bfd/elf.c
index 1780074..3d2eee9 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3998,9 +3998,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
elf_section_data (s)->this_hdr.sh_link = d->this_idx;
/* This is a .stab section. */
- if (elf_section_data (s)->this_hdr.sh_entsize == 0)
- elf_section_data (s)->this_hdr.sh_entsize
- = 4 + 2 * bfd_get_arch_size (abfd) / 8;
+ elf_section_data (s)->this_hdr.sh_entsize = 12;
}
}
break;