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)
Mon, Apr 6, 10:32 AM
Unknown Object (File)
Sun, Apr 5, 12:41 PM
Unknown Object (File)
Wed, Apr 1, 1:51 PM
Unknown Object (File)
Wed, Mar 25, 1:45 AM
Unknown Object (File)
Tue, Mar 24, 9:42 PM
Unknown Object (File)
Tue, Mar 24, 7:42 AM
Unknown Object (File)
Tue, Mar 24, 2:18 AM
Unknown Object (File)
Mon, Mar 23, 12:57 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.