[PATCH] ld -r: Don't merge with member of output section group

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] ld -r: Don't merge with member of output section group

H.J. Lu-30
When doing a relocatable link, members of input section group are
placed in their own output sections.  We need to make sure that no
input sections are merged with member of output section group.

OK for master and release branches?

PR ld/24819
* emultempl/elf32.em (elf_orphan_compatible): Return FALSE for
member of output section group when doing a relocatable link.
* testsuite/ld-elf/pr24819.d: New file.
* testsuite/ld-elf/pr24819.s: Likewise.

--
H.J.

0001-ld-r-Don-t-merge-with-member-of-output-section-group.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ld -r: Don't merge with member of output section group

Alan Modra-3
On Wed, Jul 17, 2019 at 01:20:04PM -0700, H.J. Lu wrote:
> PR ld/24819
> * emultempl/elf32.em (elf_orphan_compatible): Return FALSE for
> member of output section group when doing a relocatable link.
> * testsuite/ld-elf/pr24819.d: New file.
> * testsuite/ld-elf/pr24819.s: Likewise.

OK.

--
Alan Modra
Australia Development Lab, IBM
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ld -r: Don't merge with member of output section group

Alan Modra-3
On Thu, Jul 18, 2019 at 10:11:24PM +0930, Alan Modra wrote:
> On Wed, Jul 17, 2019 at 01:20:04PM -0700, H.J. Lu wrote:
> > PR ld/24819
> > * emultempl/elf32.em (elf_orphan_compatible): Return FALSE for
> > member of output section group when doing a relocatable link.
> > * testsuite/ld-elf/pr24819.d: New file.
> > * testsuite/ld-elf/pr24819.s: Likewise.
>
> OK.

d30v-elf  +FAIL: ld-elf/pr24819
dlx-elf  +FAIL: ld-elf/pr24819
fr30-elf  +FAIL: ld-elf/pr24819
frv-elf  +FAIL: ld-elf/pr24819
ft32-elf  +FAIL: ld-elf/pr24819
iq2000-elf  +FAIL: ld-elf/pr24819
mn10200-elf  +FAIL: ld-elf/pr24819
moxie-elf  +FAIL: ld-elf/pr24819
msp430-elf  +FAIL: ld-elf/pr24819
mt-elf  +FAIL: ld-elf/pr24819
pj-elf  +FAIL: ld-elf/pr24819
s12z-elf  +FAIL: ld-elf/pr24819
xgate-elf  +FAIL: ld-elf/pr24819

I'm going to commit the following after another test run.

        PR 24819
        * testsuite/ld-elf/pr24819.d: xfail for genelf targets.

diff --git a/ld/testsuite/ld-elf/pr24819.d b/ld/testsuite/ld-elf/pr24819.d
index 0a82b63c39..c97ef5fbac 100644
--- a/ld/testsuite/ld-elf/pr24819.d
+++ b/ld/testsuite/ld-elf/pr24819.d
@@ -1,5 +1,6 @@
 #ld: -r
 #readelf: -S --wide
+#xfail: [uses_genelf]
 
 #...
   \[[ 0-9]+\] \.data\.foo[ \t]+PROGBITS[ \t0-9a-f]+WAG .*


--
Alan Modra
Australia Development Lab, IBM