diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2023-08-30 10:24:56 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2023-08-30 17:17:31 -0700 |
commit | 68a2d9bf874643da970fe945a9c60c397f6882ad (patch) | |
tree | 60eaddb169ea2d0e6e51cdcfc05b3e8200fefc8c /ld/testsuite/ld-elf/pr30791c.s | |
parent | bac5753ca24bbbd601b6be93faa40e9458d8baa5 (diff) | |
download | gdb-68a2d9bf874643da970fe945a9c60c397f6882ad.zip gdb-68a2d9bf874643da970fe945a9c60c397f6882ad.tar.gz gdb-68a2d9bf874643da970fe945a9c60c397f6882ad.tar.bz2 |
elf: Don't merge sections with different SHF_LINK_ORDER
For relocatable link, don't merge 2 SHF_LINK_ORDER sections if output
sections of their linked to sections are different.
* ldelf.c (elf_orphan_compatible): Don't merge sections with
different SHF_LINK_ORDER.
* testsuite/ld-elf/pr30791a.d: New file.
* testsuite/ld-elf/pr30791a.s: Likewise.
* testsuite/ld-elf/pr30791b.d: Likewise.
* testsuite/ld-elf/pr30791b.s: Likewise.
* testsuite/ld-elf/pr30791c.s: Likewise.
* testsuite/ld-elf/pr30791d.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elf/pr30791c.s')
-rw-r--r-- | ld/testsuite/ld-elf/pr30791c.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr30791c.s b/ld/testsuite/ld-elf/pr30791c.s new file mode 100644 index 0000000..71ef77b --- /dev/null +++ b/ld/testsuite/ld-elf/pr30791c.s @@ -0,0 +1,20 @@ + .text + .globl a + .type a, %function +a: +.LFB0: + .section __patchable_function_entries,"awo",%progbits,.LPFE0 + .dc.a .LPFE0 + .text +.LPFE0: + .byte 0 + .text + .globl b + .type b, %function +b: +.LFB1: + .section __patchable_function_entries,"awo",%progbits,.LPFE1 + .dc.a .LPFE1 + .text +.LPFE1: + .byte 0 |