Page MenuHomeFreeBSD

elfcopy: add symbol hiding support
Needs ReviewPublic

Authored by emaste on Aug 24 2016, 5:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 22, 2:35 AM
Unknown Object (File)
Fri, Jun 21, 1:19 PM
Unknown Object (File)
Apr 28 2024, 4:34 AM
Unknown Object (File)
Apr 28 2024, 2:49 AM
Unknown Object (File)
Mar 27 2024, 11:32 PM
Unknown Object (File)
Mar 27 2024, 11:30 PM
Unknown Object (File)
Feb 23 2024, 1:52 PM
Unknown Object (File)
Dec 17 2023, 5:29 PM
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)