Support excluded sections#1077
Conversation
|
Hello there! Could you run
Yeah, Wild unlike other linkers performs sections GC by default. For this test we need to disable it, to make sure the section is discarded even without GC. |
davidlattimore
left a comment
There was a problem hiding this comment.
Thanks for working on this!
Done. I've also pushed forcing |
|
Yep, if you wanted to go the shared object route, I think you'd add I think it might also be possible to remove the |
|
The closest assembly only test would be |
|
Thanks! I've adapted the test to copy |
|
section.got Looks like GNU ld is generating a GOT section on aarch64. You could add //#DiffIgnore:section.got |
|
Done. Hopefully this will pass CI now, but it doesn't like me enough to run automatically. |
|
(thanks mati :) |
Now that you've had a PR merged, I think any subsequent PRs won't need approval for actions to run. Thanks for your contribution! |
This adds support for sections to exclude, flagged "e", as described in #1073.
As expected from the description, with this PR a rust helloworld is indeed 1.3MB, and 8.1MB without it as the
.llvmbcsections are not discarded.I'm not sure about the test. I don't really know what I'm doing and wasn't able to test how the issue describes: I kept hitting errors about loaded sections while trying make a shared object. I'm also not sure if it should be using
--no-gc-sections. To be clear, I have verified it fails without the last commit discarding excluded sections.