@@ -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;
@@ -2631,14 +2630,6 @@ void Writer::prepareLoadConfig() {
2631
2630
}
2632
2631
2633
2632
template <typename T> void Writer::prepareLoadConfig (T *loadConfig) {
2634
- if (ctx.config .dependentLoadFlags )
2635
- loadConfig->DependentLoadFlags = ctx.config .dependentLoadFlags ;
2636
-
2637
- checkLoadConfigGuardData (loadConfig);
2638
- }
2639
-
2640
- template <typename T>
2641
- void Writer::checkLoadConfigGuardData (const T *loadConfig) {
2642
2633
size_t loadConfigSize = loadConfig->Size ;
2643
2634
2644
2635
#define RETURN_IF_NOT_CONTAINS (field ) \
@@ -2660,6 +2651,11 @@ void Writer::checkLoadConfigGuardData(const T *loadConfig) {
2660
2651
if (loadConfig->field != s->getVA ()) \
2661
2652
warn (#field " not set correctly in '_load_config_used'" );
2662
2653
2654
+ if (ctx.config .dependentLoadFlags ) {
2655
+ RETURN_IF_NOT_CONTAINS (DependentLoadFlags)
2656
+ loadConfig->DependentLoadFlags = ctx.config .dependentLoadFlags ;
2657
+ }
2658
+
2663
2659
if (ctx.config .guardCF == GuardCFLevel::Off)
2664
2660
return ;
2665
2661
RETURN_IF_NOT_CONTAINS (GuardFlags)
0 commit comments