Page MenuHomeFreeBSD

elfcopy: add symbol hiding support
Needs ReviewPublic

Authored by emaste on Aug 24 2016, 5:07 PM.
Tags
None
Referenced Files
F124683121: D7637.id.diff
Tue, Jul 29, 5:02 AM
Unknown Object (File)
Sun, Jul 6, 7:34 PM
Unknown Object (File)
Thu, Jul 3, 10:18 AM
Unknown Object (File)
Thu, Jul 3, 3:00 AM
Unknown Object (File)
Thu, Jul 3, 12:29 AM
Unknown Object (File)
Tue, Jul 1, 7:05 PM
Unknown Object (File)
Mon, Jun 30, 6:13 PM
Unknown Object (File)
Mar 13 2025, 9:39 AM
Subscribers
None

Details

Summary

This adds --hide-symbol and --hide-symbols options to elfcopy, which give the given symbol(s) hidden visibility.

I used this during lld bringup, before it supported versioned symbols, to build a version of libc_pic.a with symbols hidden, so that they didn't leak into ld-elf.so. (Also see D5650 for another change related to disabling symbol versioning.)

Versioned symbols are now supported in lld and I no longer need this, but it seems like a feature that could be useful to have in elfcopy, so I'm posting for comments. Man page will be updated if there's interest in taking this.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste retitled this revision from to elfcopy: add symbol hiding support.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)