@@ -277,7 +277,6 @@ class Writer {
277
277
278
278
void prepareLoadConfig ();
279
279
template <typename T> void prepareLoadConfig (T *loadConfig);
280
- template <typename T> void checkLoadConfigGuardData (const T *loadConfig);
281
280
282
281
std::unique_ptr<FileOutputBuffer> &buffer;
283
282
std::map<PartialSectionKey, PartialSection *> partialSections;
@@ -2633,14 +2632,6 @@ void Writer::prepareLoadConfig() {
2633
2632
}
2634
2633
2635
2634
template <typename T> void Writer::prepareLoadConfig (T *loadConfig) {
2636
- if (ctx.config .dependentLoadFlags )
2637
- loadConfig->DependentLoadFlags = ctx.config .dependentLoadFlags ;
2638
-
2639
- checkLoadConfigGuardData (loadConfig);
2640
- }
2641
-
2642
- template <typename T>
2643
- void Writer::checkLoadConfigGuardData (const T *loadConfig) {
2644
2635
size_t loadConfigSize = loadConfig->Size ;
2645
2636
2646
2637
#define RETURN_IF_NOT_CONTAINS (field ) \
@@ -2662,6 +2653,11 @@ void Writer::checkLoadConfigGuardData(const T *loadConfig) {
2662
2653
if (loadConfig->field != s->getVA ()) \
2663
2654
warn (#field " not set correctly in '_load_config_used'" );
2664
2655
2656
+ if (ctx.config .dependentLoadFlags ) {
2657
+ RETURN_IF_NOT_CONTAINS (DependentLoadFlags)
2658
+ loadConfig->DependentLoadFlags = ctx.config .dependentLoadFlags ;
2659
+ }
2660
+
2665
2661
if (ctx.config .guardCF == GuardCFLevel::Off)
2666
2662
return ;
2667
2663
RETURN_IF_NOT_CONTAINS (GuardFlags)
0 commit comments