Page MenuHomeFreeBSD

lld: add -z interpose support
ClosedPublic

Authored by emaste on Sep 14 2018, 1:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 4:31 AM
Unknown Object (File)
Nov 19 2024, 11:39 PM
Unknown Object (File)
Nov 4 2024, 3:41 PM
Unknown Object (File)
Nov 2 2024, 3:43 AM
Unknown Object (File)
Oct 26 2024, 7:09 PM
Unknown Object (File)
Oct 26 2024, 8:22 AM
Unknown Object (File)
Oct 24 2024, 5:01 AM
Unknown Object (File)
Oct 16 2024, 6:40 PM

Details

Reviewers
dim
markj
Group Reviewers
manpages
Commits
rS338682: lld: add -z interpose support
Summary

-z interpose sets the DF_1_INTERPOSE flag, marking the object as an interposer.

PR:             230604
Reported by:    jbeich
Sponsored by:   The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added subscribers: bdrewery, jbeich.

I will add an automated test case and submit this upstream shortly, but would like to get this sorted out in advance of 12.0's branch.

-z interpose sets DF_1_INTERPOSE in DT_FLAGS_1 as expected:

Dynamic section at offset 0x3028 contains 22 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.7]
 0x000000006ffffffb (FLAGS_1)            Flags: INTERPOSE
...

I did find that ELF Tool Chain readelf does not decode DT_FLAGS_1 though:

Dynamic section at offset 0x3028 contains 22 entries:
  Tag                Type                  Name/Value
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x000000006ffffffb FLAGS_1             
...
markj added inline comments.
usr.bin/clang/lld/ld.lld.1
456 ↗(On Diff #48048)

"indicate"

457 ↗(On Diff #48048)

I'd put a comma after "application," but that's just me.

This revision is now accepted and ready to land.Sep 14 2018, 3:08 PM
This revision now requires review to proceed.Sep 14 2018, 3:09 PM
This revision is now accepted and ready to land.Sep 14 2018, 3:11 PM
This revision was automatically updated to reflect the committed changes.