lld might generate a .relro_padding section, it should be WRITE|ALLOC
to be part of PT_GNU_TLS.
* src/elflint.c (special_sections): Add .relro_padding.
Signed-off-by: Mark Wielaard <[email protected]>
---
src/elflint.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/elflint.c b/src/elflint.c
index daa9410d20d9..f47593dfb984 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -3703,6 +3703,10 @@ static const struct
{ ".plt", 5, SHT_PROGBITS, unused, 0, 0 }, // XXX more tests
{ ".preinit_array", 15, SHT_PREINIT_ARRAY, exact, SHF_ALLOC | SHF_WRITE, 0
},
{ ".rela", 5, SHT_RELA, atleast, 0, SHF_ALLOC | SHF_INFO_LINK }, // XXX
more tests
+
+ /* lld extension. Added before relr so it doesn't match that entry. */
+ { ".relro_padding", 15, SHT_NOBITS, exact, SHF_ALLOC | SHF_WRITE, 0 },
+
{ ".relr", 5, SHT_RELR, atleast, 0, SHF_ALLOC }, // XXX more tests
{ ".rel", 4, SHT_REL, atleast, 0, SHF_ALLOC | SHF_INFO_LINK }, // XXX more
tests
{ ".rodata", 8, SHT_PROGBITS, atleast, SHF_ALLOC, SHF_MERGE | SHF_STRINGS
},
--
2.52.0