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, Apr 16, 6:38 PM
Unknown Object (File)
Feb 8 2024, 4:51 AM
Unknown Object (File)
Dec 20 2023, 12:26 AM
Unknown Object (File)
Dec 19 2023, 12:42 PM
Unknown Object (File)
Dec 13 2023, 4:28 PM
Unknown Object (File)
Sep 9 2023, 3:37 AM
Unknown Object (File)
Sep 4 2023, 1:41 PM
Unknown Object (File)
Aug 15 2023, 12:28 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.