@@ -52,7 +52,7 @@ class EhFrameSection final : public SyntheticSection {
52
52
public:
53
53
EhFrameSection ();
54
54
void writeTo (uint8_t *buf) override ;
55
- void finalizeContents () override ;
55
+ void finalizeContents (Ctx & ) override ;
56
56
bool isNeeded () const override { return !sections.empty (); }
57
57
size_t getSize () const override { return size; }
58
58
@@ -106,7 +106,7 @@ class GotSection final : public SyntheticSection {
106
106
public:
107
107
GotSection ();
108
108
size_t getSize () const override { return size; }
109
- void finalizeContents () override ;
109
+ void finalizeContents (Ctx & ) override ;
110
110
bool isNeeded () const override ;
111
111
void writeTo (uint8_t *buf) override ;
112
112
@@ -186,7 +186,7 @@ class MipsGotSection final : public SyntheticSection {
186
186
void writeTo (uint8_t *buf) override ;
187
187
size_t getSize () const override { return size; }
188
188
bool updateAllocSize () override ;
189
- void finalizeContents () override ;
189
+ void finalizeContents (Ctx & ) override ;
190
190
bool isNeeded () const override ;
191
191
192
192
// Join separate GOTs built for each input file to generate
@@ -484,7 +484,7 @@ template <class ELFT> class DynamicSection final : public SyntheticSection {
484
484
485
485
public:
486
486
DynamicSection ();
487
- void finalizeContents () override ;
487
+ void finalizeContents (Ctx & ) override ;
488
488
void writeTo (uint8_t *buf) override ;
489
489
size_t getSize () const override { return size; }
490
490
@@ -545,7 +545,7 @@ class RelocationBaseSection : public SyntheticSection {
545
545
size_t getRelativeRelocCount () const { return numRelativeRelocs; }
546
546
void mergeRels ();
547
547
void partitionRels ();
548
- void finalizeContents () override ;
548
+ void finalizeContents (Ctx & ) override ;
549
549
static bool classof (const SectionBase *d) {
550
550
return SyntheticSection::classof (d) &&
551
551
(d->type == llvm::ELF::SHT_RELA || d->type == llvm::ELF::SHT_REL ||
@@ -647,7 +647,7 @@ struct SymbolTableEntry {
647
647
class SymbolTableBaseSection : public SyntheticSection {
648
648
public:
649
649
SymbolTableBaseSection (StringTableSection &strTabSec);
650
- void finalizeContents () override ;
650
+ void finalizeContents (Ctx & ) override ;
651
651
size_t getSize () const override { return getNumSymbols () * entsize; }
652
652
void addSymbol (Symbol *sym);
653
653
unsigned getNumSymbols () const { return symbols.size () + 1 ; }
@@ -683,15 +683,15 @@ class SymtabShndxSection final : public SyntheticSection {
683
683
void writeTo (uint8_t *buf) override ;
684
684
size_t getSize () const override ;
685
685
bool isNeeded () const override ;
686
- void finalizeContents () override ;
686
+ void finalizeContents (Ctx & ) override ;
687
687
};
688
688
689
689
// Outputs GNU Hash section. For detailed explanation see:
690
690
// https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections
691
691
class GnuHashTableSection final : public SyntheticSection {
692
692
public:
693
693
GnuHashTableSection ();
694
- void finalizeContents () override ;
694
+ void finalizeContents (Ctx & ) override ;
695
695
void writeTo (uint8_t *buf) override ;
696
696
size_t getSize () const override { return size; }
697
697
@@ -719,7 +719,7 @@ class GnuHashTableSection final : public SyntheticSection {
719
719
class HashTableSection final : public SyntheticSection {
720
720
public:
721
721
HashTableSection ();
722
- void finalizeContents () override ;
722
+ void finalizeContents (Ctx & ) override ;
723
723
void writeTo (uint8_t *buf) override ;
724
724
size_t getSize () const override { return size; }
725
725
@@ -913,7 +913,7 @@ template <class ELFT>
913
913
class DebugNamesSection final : public DebugNamesBaseSection {
914
914
public:
915
915
DebugNamesSection ();
916
- void finalizeContents () override ;
916
+ void finalizeContents (Ctx & ) override ;
917
917
void writeTo (uint8_t *buf) override ;
918
918
919
919
template <class RelTy >
@@ -1016,7 +1016,7 @@ class EhFrameHeader final : public SyntheticSection {
1016
1016
class VersionDefinitionSection final : public SyntheticSection {
1017
1017
public:
1018
1018
VersionDefinitionSection ();
1019
- void finalizeContents () override ;
1019
+ void finalizeContents (Ctx & ) override ;
1020
1020
size_t getSize () const override ;
1021
1021
void writeTo (uint8_t *buf) override ;
1022
1022
@@ -1038,7 +1038,7 @@ class VersionDefinitionSection final : public SyntheticSection {
1038
1038
class VersionTableSection final : public SyntheticSection {
1039
1039
public:
1040
1040
VersionTableSection ();
1041
- void finalizeContents () override ;
1041
+ void finalizeContents (Ctx & ) override ;
1042
1042
size_t getSize () const override ;
1043
1043
void writeTo (uint8_t *buf) override ;
1044
1044
bool isNeeded () const override ;
@@ -1069,7 +1069,7 @@ class VersionNeedSection final : public SyntheticSection {
1069
1069
1070
1070
public:
1071
1071
VersionNeedSection ();
1072
- void finalizeContents () override ;
1072
+ void finalizeContents (Ctx & ) override ;
1073
1073
void writeTo (uint8_t *buf) override ;
1074
1074
size_t getSize () const override ;
1075
1075
bool isNeeded () const override ;
@@ -1097,7 +1097,7 @@ class MergeTailSection final : public MergeSyntheticSection {
1097
1097
1098
1098
size_t getSize () const override ;
1099
1099
void writeTo (uint8_t *buf) override ;
1100
- void finalizeContents () override ;
1100
+ void finalizeContents (Ctx & ) override ;
1101
1101
1102
1102
private:
1103
1103
llvm::StringTableBuilder builder;
@@ -1111,7 +1111,7 @@ class MergeNoTailSection final : public MergeSyntheticSection {
1111
1111
1112
1112
size_t getSize () const override { return size; }
1113
1113
void writeTo (uint8_t *buf) override ;
1114
- void finalizeContents () override ;
1114
+ void finalizeContents (Ctx & ) override ;
1115
1115
1116
1116
private:
1117
1117
// We use the most significant bits of a hash as a shard ID.
@@ -1240,7 +1240,7 @@ class ARMExidxSyntheticSection : public SyntheticSection {
1240
1240
void writeTo (uint8_t *buf) override ;
1241
1241
bool isNeeded () const override ;
1242
1242
// Sort and remove duplicate entries.
1243
- void finalizeContents () override ;
1243
+ void finalizeContents (Ctx & ) override ;
1244
1244
InputSection *getLinkOrderDep () const ;
1245
1245
1246
1246
static bool classof (const SectionBase *sec) {
@@ -1313,7 +1313,7 @@ class ArmCmseSGSection final : public SyntheticSection {
1313
1313
void writeTo (uint8_t *buf) override ;
1314
1314
void addSGVeneer (Symbol *sym, Symbol *ext_sym);
1315
1315
void addMappingSymbol ();
1316
- void finalizeContents () override ;
1316
+ void finalizeContents (Ctx & ) override ;
1317
1317
void exportEntries (SymbolTableBaseSection *symTab);
1318
1318
uint64_t impLibMaxAddr = 0 ;
1319
1319
@@ -1330,7 +1330,7 @@ class PPC32Got2Section final : public SyntheticSection {
1330
1330
PPC32Got2Section ();
1331
1331
size_t getSize () const override { return 0 ; }
1332
1332
bool isNeeded () const override ;
1333
- void finalizeContents () override ;
1333
+ void finalizeContents (Ctx & ) override ;
1334
1334
void writeTo (uint8_t *buf) override {}
1335
1335
};
1336
1336
@@ -1347,7 +1347,7 @@ class PPC64LongBranchTargetSection final : public SyntheticSection {
1347
1347
size_t getSize () const override ;
1348
1348
void writeTo (uint8_t *buf) override ;
1349
1349
bool isNeeded () const override ;
1350
- void finalizeContents () override { finalized = true ; }
1350
+ void finalizeContents (Ctx & ) override { finalized = true ; }
1351
1351
1352
1352
private:
1353
1353
SmallVector<std::pair<const Symbol *, int64_t >, 0 > entries;
@@ -1375,7 +1375,7 @@ class PartitionIndexSection final : public SyntheticSection {
1375
1375
public:
1376
1376
PartitionIndexSection ();
1377
1377
size_t getSize () const override ;
1378
- void finalizeContents () override ;
1378
+ void finalizeContents (Ctx & ) override ;
1379
1379
void writeTo (uint8_t *buf) override ;
1380
1380
};
1381
1381
0 commit comments