Skip to content

Support -M <mapfile> option for Solaris/illumos ld#324

Merged
janbrummer merged 1 commit intolibproxy:mainfrom
trisk:ld-mapfile-support
Jun 10, 2025
Merged

Support -M <mapfile> option for Solaris/illumos ld#324
janbrummer merged 1 commit intolibproxy:mainfrom
trisk:ld-mapfile-support

Conversation

@trisk
Copy link
Copy Markdown
Contributor

@trisk trisk commented May 20, 2025

The mapfile format for Solaris/illumos ld is the same one used by GNU ld, but the linker option is -M <mapfile> instead of --version-script,<mapfile>. -Blocal or -Beliminate is also needed to deal with symbols not specified in the mapfile. Use an empty test mapfile with no symbols for link tests.

@janbrummer
Copy link
Copy Markdown
Contributor

Thanks for your PR, love it. We just had a quick discuison about this PR and we would like to see a solaris host_system check to decided which way to go. Could you please rewrite it?

@janbrummer
Copy link
Copy Markdown
Contributor

Could you please check whether #326 helps a bit?

@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 5, 2025

Could you please check whether #326 helps?

It doesn't change anything, since our ld doesn't understand --undefined-version either.

@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 5, 2025

Thanks for your PR, love it. We just had a quick discuison about this PR and we would like to see a solaris host_system check to decided which way to go. Could you please rewrite it?

Sure, I can wrap it with a host_system check.
I see a suggestion for a slightly more elegant implementation of the empty mapfile test in #320 so I'll try to update this one as well.

Use empty test mapfile with no symbols for link tests.
@trisk trisk force-pushed the ld-mapfile-support branch from e3a86ce to e85c52d Compare June 5, 2025 07:50
@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 5, 2025

Simplified the test and wrapped it in a build_machine.system() check. I also added a symbol auto-reduction directive local: * to the real mapfile which removes the need to pass -B local or -B eliminate to ld.

@janbrummer
Copy link
Copy Markdown
Contributor

Fine for me. Any objections @DimStar77 ?

@janbrummer
Copy link
Copy Markdown
Contributor

Ok, lets fly then :) Thanks!

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.37%. Comparing base (de9c069) to head (e85c52d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
+ Coverage   69.30%   69.37%   +0.06%     
==========================================
  Files          18       18              
  Lines         935      937       +2     
  Branches      265      267       +2     
==========================================
+ Hits          648      650       +2     
  Misses        174      174              
  Partials      113      113              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@janbrummer janbrummer merged commit 08069f7 into libproxy:main Jun 10, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants