Author: Fangrui Song
Date: 2025-08-05T10:02:53-07:00
New Revision: 913c5b4d1fffa00585edb6ba4f0915f29afa90cc

URL: 
https://github.com/llvm/llvm-project/commit/913c5b4d1fffa00585edb6ba4f0915f29afa90cc
DIFF: 
https://github.com/llvm/llvm-project/commit/913c5b4d1fffa00585edb6ba4f0915f29afa90cc.diff

LOG: clang -cc1as: Remove a redundant initSections call

`Parser->Run(Opts.NoInitialTextSection)` calls initSections. Remove a
redundant initSections to remove an extra FT_Align fragment, observed
when investigating a missing MCOrgFragment relaxation issue
https://github.com/ClangBuiltLinux/linux/issues/2116

Added: 
    

Modified: 
    clang/tools/driver/cc1as_main.cpp

Removed: 
    


################################################################################
diff  --git a/clang/tools/driver/cc1as_main.cpp 
b/clang/tools/driver/cc1as_main.cpp
index e9243ca59fc6f..dda601c46472c 100644
--- a/clang/tools/driver/cc1as_main.cpp
+++ b/clang/tools/driver/cc1as_main.cpp
@@ -577,7 +577,6 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
     Triple T(Opts.Triple);
     Str.reset(TheTarget->createMCObjectStreamer(
         T, Ctx, std::move(MAB), std::move(OW), std::move(CE), *STI));
-    Str->initSections(Opts.NoExecStack, *STI);
     if (T.isOSBinFormatMachO() && T.isOSDarwin()) {
       Triple *TVT = Opts.DarwinTargetVariantTriple
                         ? &*Opts.DarwinTargetVariantTriple


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to