[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/32219] ELF orphan placement doesn't work well without .interp
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/32219] ELF orphan placement doesn't work well without .interp |
Date: |
Fri, 27 Sep 2024 11:54:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32219
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
This patch removes .interp and uses .rodata for note sections instead:
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 09691609fc0..b09ba054ed5 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -2121,9 +2121,6 @@ ldelf_place_orphan (asection *s, const char *secname, int
constraint)
{ 0,
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
0, 0, 0, 0 },
- { ".interp",
- SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
- 0, 0, 0, 0 },
{ ".sdata",
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_SMALL_DATA,
0, 0, 0, 0 },
@@ -2139,7 +2136,6 @@ ldelf_place_orphan (asection *s, const char *secname, int
constraint)
orphan_data,
orphan_bss,
orphan_rel,
- orphan_interp,
orphan_sdata,
orphan_nonalloc
};
@@ -2328,7 +2324,7 @@ ldelf_place_orphan (asection *s, const char *secname, int
constraint)
&& (elfinput
? sh_type == SHT_NOTE
: startswith (secname, ".note")))
- place = &hold[orphan_interp];
+ place = &hold[orphan_rodata];
else if ((flags & (SEC_LOAD | SEC_HAS_CONTENTS | SEC_THREAD_LOCAL)) == 0)
place = &hold[orphan_bss];
else if ((flags & SEC_SMALL_DATA) != 0)
But -z separate-code still doesn't work for many targets.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/32219] New: ELF orphan placement doesn't work well without .interp, hjl.tools at gmail dot com, 2024/09/26
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp, nickc at redhat dot com, 2024/09/27
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp,
hjl.tools at gmail dot com <=
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp, nickc at redhat dot com, 2024/09/27
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp, sam at gentoo dot org, 2024/09/27
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp, hjl.tools at gmail dot com, 2024/09/27
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp, cvs-commit at gcc dot gnu.org, 2024/09/30
- [Bug ld/32219] ELF orphan placement doesn't work well without .interp, nickc at redhat dot com, 2024/09/30