[PATCH v3] elf: Handle .gnu.debuglto_.debug_* sections
Alan Modra
amodra@gmail.com
Fri Mar 19 09:44:03 GMT 2021
On Fri, Mar 19, 2021 at 05:06:56PM +1030, Alan Modra wrote:
> On Fri, Mar 19, 2021 at 02:00:14PM +1030, Alan Modra wrote:
> > On Thu, Mar 18, 2021 at 07:21:13PM -0700, H.J. Lu wrote:
> > > Good point. Here is the v3 patch with a testcase for
> > > --reduce-memory-overheads. OK for master?
> >
> > Looks OK to me.
>
> The testcase needs tweaking for targets that don't reduce the label to
> a section symbol.
PR 27590
* testsuite/ld-elf/pr27590a.d: Match relocs using label, and
R_MIPS_NONE.
* testsuite/ld-elf/pr27590b.d: Likewise.
diff --git a/ld/testsuite/ld-elf/pr27590a.d b/ld/testsuite/ld-elf/pr27590a.d
index c24cd8907a..7c97975fd5 100644
--- a/ld/testsuite/ld-elf/pr27590a.d
+++ b/ld/testsuite/ld-elf/pr27590a.d
@@ -5,6 +5,8 @@
Relocation section '\.rel.*\.gnu\.debuglto_\.debug_macro' at offset 0x[0-9a-z]+ contains 2 entries:
[ \t]+Offset[ \t]+Info[ \t]+Type[ \t]+Sym.*
-[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+\.gnu\.debuglto_\.debug_macro.*
-[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+\.gnu\.debuglto_\.debug_macro.*
+[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+(\.gnu\.debuglto_\.debug_macro|\.Ldebug_macro2).*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
+[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+(\.gnu\.debuglto_\.debug_macro|\.Ldebug_macro2).*
#pass
diff --git a/ld/testsuite/ld-elf/pr27590b.d b/ld/testsuite/ld-elf/pr27590b.d
index 68b198b299..49a7c3a1e8 100644
--- a/ld/testsuite/ld-elf/pr27590b.d
+++ b/ld/testsuite/ld-elf/pr27590b.d
@@ -5,6 +5,8 @@
Relocation section '\.rel.*\.gnu\.debuglto_\.debug_macro' at offset 0x[0-9a-z]+ contains 2 entries:
[ \t]+Offset[ \t]+Info[ \t]+Type[ \t]+Sym.*
-[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+\.gnu\.debuglto_\.debug_macro.*
-[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+\.gnu\.debuglto_\.debug_macro.*
+[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+(\.gnu\.debuglto_\.debug_macro|\.Ldebug_macro2).*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
+[0-9a-f]+[ \t]+[0-9a-f]+[ \t]+R_.*[ \t]+[0]+[ \t]+(\.gnu\.debuglto_\.debug_macro|\.Ldebug_macro2).*
#pass
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list