[PATCH] ld: Pass -z textoff to linker for tests with DT_TEXTREL

H.J. Lu hjl.tools@gmail.com
Mon May 25 11:53:31 GMT 2020


On Sun, May 24, 2020 at 9:30 PM Fangrui Song <i@maskray.me> wrote:
>
> Thanks for the patch. I think Gentoo people will also appreciate you
> making the lead
> (https://sourceware.org/bugzilla/show_bug.cgi?id=22909)
> Just a question, why is the option -z textoff instead of -z notext

This is the patch I am checking in.

> (Honestly these options all appear to be very misleading: -z notext
> stands for "enabling text relocations" while -z text means "disabling
> text relocations"
> I cannot associated "textoff" with "enabling text relocations"...
> )

We can't change these options now.

> On Sun, May 24, 2020 at 8:36 PM H.J. Lu via Binutils
> <binutils@sourceware.org> wrote:
> >
> > Some linker tests need DT_TEXTREL.  Pass -z textoff to linker for these
> > tests so that they will pass with DT_TEXTREL check defaulting to warning
> > or error.
> >
> >         * testsuite/ld-elf/eh6.d: Pass -z textoff to linker.
> >         * testsuite/ld-elf/ehdr_start-shared.d: Likewise.
> >         * testsuite/ld-elf/pr19539.d: Likewise.
> >         * testsuite/ld-elfvers/vers.exp: Likewise.
> >         * testsuite/ld-elfvsb/elfvsb.exp: Likewise.
> >         * testsuite/ld-i386/i386.exp: Likewise.
> >         * testsuite/ld-i386/nogot1.d: Likewise.
> >         * testsuite/ld-i386/pr19539.d: Likewise.
> >         * testsuite/ld-i386/pr19636-2a.d: Likewise.
> >         * testsuite/ld-i386/pr19636-2b.d: Likewise.
> >         * testsuite/ld-i386/pr19636-2c.d: Likewise.
> >         * testsuite/ld-i386/pr19636-2d.d: Likewise.
> >         * testsuite/ld-i386/pr19636-2e.d: Likewise.
> >         * testsuite/ld-i386/pr19636-3d.d: Likewise.
> >         * testsuite/ld-i386/pr19636-3e.d: Likewise.
> >         * testsuite/ld-i386/pr19939b.d: Likewise.
> >         * testsuite/ld-i386/undefweaka.d: Likewise.
> >         * testsuite/ld-i386/undefweakb.d: Likewise.
> >         * testsuite/ld-shared/shared.exp: Likewise.
> >         * testsuite/ld-size/size.exp: Likewise.
> >         * testsuite/ld-unique/unique.exp: Likewise.
> >         * testsuite/ld-x86-64/pie1.d: Likewise.
> >         * testsuite/ld-x86-64/pr19539a.d: Likewise.
> >         * testsuite/ld-x86-64/pr19539b.d: Likewise.
> >         * testsuite/ld-x86-64/pr19636-1d.d: Likewise.
> >         * testsuite/ld-x86-64/pr19636-1e.d: Likewise.
> >         * testsuite/ld-x86-64/pr19807-1a.d: Likewise.
> >         * testsuite/ld-x86-64/pr19807-1b.d: Likewise.
> >         * testsuite/ld-x86-64/pr19807-2b.d: Likewise.
> >         * testsuite/ld-x86-64/pr19807-2c.d: Likewise.
> >         * testsuite/ld-x86-64/pr19807-2d.d: Likewise.
> >         * testsuite/ld-x86-64/pr19807-2e.d: Likewise.
> >         * testsuite/ld-x86-64/pr19939b.d: Likewise.
> >         * testsuite/ld-x86-64/x86-64.exp: Likewise.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ld-Pass-z-notext-to-linker-for-tests-with-DT_TEXTREL.patch
Type: text/x-patch
Size: 25090 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200525/c16ac77f/attachment-0001.bin>


More information about the Binutils mailing list