aboutsummaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-11-17 15:59:16 +0000
committerNick Clifton <nickc@redhat.com>2021-11-17 15:59:16 +0000
commitee9e412f14908c1055cb00fab9307d1723981639 (patch)
tree4a5ba4638187d448bac46a3444a372ae0bb20922 /ld/ldgram.y
parent0df670bbe009d3b57f5dbf9599913ad06013ec4e (diff)
downloadgdb-ee9e412f14908c1055cb00fab9307d1723981639.zip
gdb-ee9e412f14908c1055cb00fab9307d1723981639.tar.gz
gdb-ee9e412f14908c1055cb00fab9307d1723981639.tar.bz2
Fix the linker script parser so that it will recognise the PT_GNU_RELRO segment type, and the linker itself so that it will gracefully handle being unable to assign any sections to such a segment.
PR 28452 bfd * elf.c (assign_file_positions_for_non_load_sections): Replace assertion with a warning message. ld * ldgram.y: Add support for PT_GNU_RELRO and PT_GNU_PROPERTY. * ldgram.c: Regenerate.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r--ld/ldgram.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index c8396bb..2eb989d 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -1262,6 +1262,10 @@ phdr_type:
$$ = exp_intop (0x6474e550);
else if (strcmp (s, "PT_GNU_STACK") == 0)
$$ = exp_intop (0x6474e551);
+ else if (strcmp (s, "PT_GNU_RELRO") == 0)
+ $$ = exp_intop (0x6474e552);
+ else if (strcmp (s, "PT_GNU_PROPERTY") == 0)
+ $$ = exp_intop (0x6474e553);
else
{
einfo (_("\