Skip to content

fix #498 by specifying section references using a named label#499

Open
conradludgate wants to merge 1 commit intooxidecomputer:masterfrom
conradludgate:fix-gc-sections-link-ordering
Open

fix #498 by specifying section references using a named label#499
conradludgate wants to merge 1 commit intooxidecomputer:masterfrom
conradludgate:fix-gc-sections-link-ordering

Conversation

@conradludgate
Copy link

See the linked issue for more details.

By specifying this "o" flag, we are telling linkers such as lld, gold, and mold to consider the .note section when performing --gc-sections on a section containing the referenced nop.

In order to use the "o" flag, we have to use a named label. To get a unique named label, we are abusing the label {} functionality of inline asm.

@aapoalas
Copy link
Contributor

I wonder if this allows us to remove the Retain ( R) flag from the _.stapsdt.base section?

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.

2 participants