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 {
524
524
std::unique_ptr<SyntheticSection> riscvAttributes;
525
525
std::unique_ptr<BssSection> bss;
526
526
std::unique_ptr<BssSection> bssRelRo;
527
+ std::unique_ptr<SyntheticSection> gnuProperty;
528
+ std::unique_ptr<SyntheticSection> gnuStack;
527
529
std::unique_ptr<GotSection> got;
528
530
std::unique_ptr<GotPltSection> gotPlt;
529
531
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) {
4907
4907
ctx.in .iplt = std::make_unique<IpltSection>(ctx);
4908
4908
add (*ctx.in .iplt );
4909
4909
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
+ }
4912
4914
4913
4915
if (ctx.arg .debugNames ) {
4914
4916
ctx.in .debugNames = std::make_unique<DebugNamesSection<ELFT>>(ctx);
@@ -4925,8 +4927,10 @@ template <class ELFT> void elf::createSyntheticSections(Ctx &ctx) {
4925
4927
// section to control the executable-ness of the stack area, but that
4926
4928
// is irrelevant these days. Stack area should always be non-executable
4927
4929
// 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
+ }
4930
4934
4931
4935
if (ctx.in .symTab )
4932
4936
add (*ctx.in .symTab );
You can’t perform that action at this time.
0 commit comments