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, Feb 5, 5:52 AM
Unknown Object (File)
Sun, Feb 2, 12:56 AM
Unknown Object (File)
Sat, Jan 25, 6:14 AM
Unknown Object (File)
Tue, Jan 21, 11:13 PM
Unknown Object (File)
Dec 21 2024, 12:51 AM
Unknown Object (File)
Nov 8 2024, 4:15 AM
Unknown Object (File)
Nov 5 2024, 12:58 PM
Unknown Object (File)
Oct 31 2024, 2:32 PM
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.