File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -524,6 +524,8 @@ struct InStruct {
524524 std::unique_ptr<SyntheticSection> riscvAttributes;
525525 std::unique_ptr<BssSection> bss;
526526 std::unique_ptr<BssSection> bssRelRo;
527+ std::unique_ptr<SyntheticSection> gnuProperty;
528+ std::unique_ptr<SyntheticSection> gnuStack;
527529 std::unique_ptr<GotSection> got;
528530 std::unique_ptr<GotPltSection> gotPlt;
529531 std::unique_ptr<IgotPltSection> igotPlt;
Original file line number Diff line number Diff line change @@ -4907,8 +4907,10 @@ template <class ELFT> void elf::createSyntheticSections(Ctx &ctx) {
49074907 ctx.in .iplt = std::make_unique<IpltSection>(ctx);
49084908 add (*ctx.in .iplt );
49094909
4910- if (ctx.arg .andFeatures || !ctx.aarch64PauthAbiCoreInfo .empty ())
4911- add (*make<GnuPropertySection>(ctx));
4910+ if (ctx.arg .andFeatures || !ctx.aarch64PauthAbiCoreInfo .empty ()) {
4911+ ctx.in .gnuProperty = std::make_unique<GnuPropertySection>(ctx);
4912+ add (*ctx.in .gnuProperty );
4913+ }
49124914
49134915 if (ctx.arg .debugNames ) {
49144916 ctx.in .debugNames = std::make_unique<DebugNamesSection<ELFT>>(ctx);
@@ -4925,8 +4927,10 @@ template <class ELFT> void elf::createSyntheticSections(Ctx &ctx) {
49254927 // section to control the executable-ness of the stack area, but that
49264928 // is irrelevant these days. Stack area should always be non-executable
49274929 // by default. So we emit this section unconditionally.
4928- if (ctx.arg .relocatable )
4929- add (*make<GnuStackSection>(ctx));
4930+ if (ctx.arg .relocatable ) {
4931+ ctx.in .gnuStack = std::make_unique<GnuStackSection>(ctx);
4932+ add (*ctx.in .gnuStack );
4933+ }
49304934
49314935 if (ctx.in .symTab )
49324936 add (*ctx.in .symTab );
You can’t perform that action at this time.
0 commit comments