Page MenuHomeFreeBSD

Build the kernel with -z notext.
ClosedPublic

Authored by markj on May 14 2019, 3:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 22, 10:39 PM
Unknown Object (File)
Sat, Oct 18, 5:32 PM
Unknown Object (File)
Wed, Oct 15, 9:33 AM
Unknown Object (File)
Mon, Oct 6, 4:26 AM
Unknown Object (File)
Sun, Sep 28, 2:53 AM
Unknown Object (File)
Thu, Sep 25, 6:10 AM
Unknown Object (File)
Sep 18 2025, 1:30 AM
Unknown Object (File)
Aug 21 2025, 2:02 AM
Subscribers

Details

Summary

The upstream implementation of -z ifunc-noplt disallows the combination
of -z text and -z ifunc-noplt. With this change DT_TEXTREL will be set
in the kernel executable, but AFAIK the change is effectively a no-op.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24234
Build 23073: arc lint + arc unit

Event Timeline

markj added reviewers: emaste, kib.
This revision is now accepted and ready to land.May 14 2019, 3:55 PM

BTW would it be better to use the -Wl,-z,notext -Wl,-z,ifunc-noplt syntax ?

In D20260#436661, @kib wrote:

BTW would it be better to use the -Wl,-z,notext -Wl,-z,ifunc-noplt syntax ?

Yes, or even -Wl,-z,notext,-z,ifunc-noplt. But at least the -z and its arg should be in the same -Wl, IMO.

In D20260#436661, @kib wrote:

BTW would it be better to use the -Wl,-z,notext -Wl,-z,ifunc-noplt syntax ?

Yes, or even -Wl,-z,notext,-z,ifunc-noplt. But at least the -z and its arg should be in the same -Wl, IMO.

Heh, I did not notice before that we are modifying LDFLAGS, not CFLAGS. So -Wl is entirely redundant and kib's suggested syntax does not work. I will remove -Wl first in a separate commit.

This revision was automatically updated to reflect the committed changes.