Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Is this a feature to build FreeBSD?
ELF/LinkerScript.cpp | ||
---|---|---|
269 ↗ | (On Diff #65013) | I would not use a default argument here. |
282 ↗ | (On Diff #65013) | Why don't you set Live flag of the section to false? |
816 ↗ | (On Diff #65013) | You can write if (skip("ONLY_IF_RO")) |
ELF/LinkerScript.h | ||
70 ↗ | (On Diff #65013) | ConstraintKind Constraint = NoConstraint; |
https://svnweb.freebsd.org/base/head/sys/conf/ldscript.amd64?revision=284870&view=markup#l78
As a general note, I'm going to implement only linker script directives/linker features for software running in the wild. You can keep that in mind.
Going to update the patch in a minute.
Addressed comments (at least a subset of them).
ELF/LinkerScript.cpp | ||
---|---|---|
282 ↗ | (On Diff #65013) | From what I see OutputSections have no Live flag, so, I assume you mean InputSections. Thanks! |
I really appreciate adding linker script features as-needed basis. Still I got to ask for a reference if its not in a commit message, so please include a sentence that "it's used by FreeBSD kernel". :)
ELF/LinkerScript.cpp | ||
---|---|---|
277 ↗ | (On Diff #65018) | I see the reason why you need it, but it can be done without adding a new field to OutputSection because this flag is used only in this function. You can define DenseSet<OitputSectionBase<ELFT>> Removed; and add a section to the set of it needs to be removed at end of this function. |
LGTM with a nit.
ELF/LinkerScript.cpp | ||
---|---|---|
815 ↗ | (On Diff #65024) | You want to remove this line. |