⚠️ Malware / Trojaner / VirenGuardBreaker: Derailing AI-assisted malware analysis with a code comment(10.09.2026 um 11:00 Uhr)
⚠️ Malware / Trojaner / VirenAttack hides malware in PNGs and drops custom reverse tunnel on victims' machines(31.08.2026 um 20:26 Uhr)
⚠️ Malware / Trojaner / Viren33-hour BGP hijack of Softaculous traffic prompts security scramble(01.09.2026 um 14:04 Uhr)
🕵️ SicherheitslückenProlific Microsoft 0-day hunter drops CrowdStrike Falcon exploit PoC(03.09.2026 um 20:08 Uhr)
🔧 AI Nachrichten OpenAI commits $1B in AI credits to frontline cyber defenders(04.09.2026 um 01:47 Uhr)
⚠️ Malware / Trojaner / VirenGuardBreaker: Derailing AI-assisted malware analysis with a code comment(10.09.2026 um 11:00 Uhr)
⚠️ Malware / Trojaner / VirenAttack hides malware in PNGs and drops custom reverse tunnel on victims' machines(31.08.2026 um 20:26 Uhr)
⚠️ Malware / Trojaner / Viren33-hour BGP hijack of Softaculous traffic prompts security scramble(01.09.2026 um 14:04 Uhr)
🕵️ SicherheitslückenProlific Microsoft 0-day hunter drops CrowdStrike Falcon exploit PoC(03.09.2026 um 20:08 Uhr)
🔧 AI Nachrichten OpenAI commits $1B in AI credits to frontline cyber defenders(04.09.2026 um 01:47 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 7 Min Lesezeit
0

GCC: Automatic Function Multi-Versioning Pt.1

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Before we start...




If you have just stumbled upon my SPO600 series of blog posts, it has been created to document and share my learnings as I progress through my Software Portability and Optimization college course.




In this blog post, I’ll start sharing the progress I made after transitioning to Stage 2 of our class project: implementing a new experimental feature in the GNU Compiler Collection (GCC) — Automatic Function Multi-Versioning.



What is Automatic Function Multi-Versioning?



As promised in my





  • /src - contains the source code of the GCC compiler


  • /build - used to configure and build the compiler


  • /install - serves as the destination directory for installing the GCC binaries





The server where I initially built the compiler was put down, so I rebuilt it on our class x86_64 server. The clean build took about 22 minutes.









Adding a New Pass



Before conducting any code experiments, I made sure that I could successfully integrate new passes into GCC.



Our professor, Chris Tyler, gave us his demo pass as a starter code for Project Stage 2. The pass was located in the public folder (/public/spo600-gcc-pass-demo.tgz). I moved it to my home directory and extracted it using the following command:




CODE
tar -xvzf spo600-gcc-pass-demo.tgz







  • Writing a new pass (GCC Wiki)




  • Rebuilding GCC with a New Pass



    After wrapping my head around the changes required to add the sample pass, I integrated it into the source code and rebuilt the project.



    I started by copying the necessary source code files using the following commands:




    CODE
    [akolodeznikova@x86-001 gcc]$ pwd
    /home/akolodeznikova/Stage-2/src/gcc
    cp ../../../test/gcc/Makefile.in .
    cp ../../../test/gcc/passes.def .
    cp ../../../test/gcc/tree-pass.h .
    cp ../../../test/gcc/tree-ctyler.cc .






    Then, I went into the build folder and ran the make command to rebuild the project with applied changes.



    The build process took approximately five minutes. Once completed, I ran the make install command to install the newly built GCC compiler into the /install folder.




    Note: the make utility efficiently rebuilds a codebase by comparing the timestamps of dependencies (inputs) and targets (outputs). It determines which source files have been modified and rebuilds only the affected targets (Chris Tyler’s Wiki).




    With the build and installation complete, I tested the setup to verify that the sample pass was working.



    To do this, I quickly created a sample file in the test folder:



    hello.c




    CODE
    #include<stdio.h>

    int main(){
    printf("Hello");
    return 0;
    }






    And then compiled it, triggering the newly added pass using the following command:




    CODE
    ~/Stage-2/install/bin/gcc hello.c -fdump-tree-ctyler






    After running the command, a file named a-hello.c.263t.ctyler was generated. The file contained the following output:




    CODE
    //a-hello.c.263t.ctyler
    ;; Function main (main, funcdef_no=0, decl_uid=3267, cgraph_uid=1, symbol_order=0)

    ===== Basic block count: 1 =====
    ----- Statement count: 1 -----
    # .MEM_2 = VDEF <.MEM_1(D)>
    printf ("Hello");
    ----- Statement count: 2 -----
    _3 = 0;
    ===== Basic block count: 2 =====
    ----- Statement count: 3 -----
    <L0>:
    ----- Statement count: 4 -----
    # VUSE <.MEM_2>
    return _3;
    int main ()
    {
    int D.3270;
    int _3;

    <bb 2> :
    printf ("Hello");
    _3 = 0;

    <bb 3> :
    <L0>:
    return _3;

    }






    The output confirmed the added pass was working as expected. It successfully iterated through the code, producing diagnostic information about basic blocks and statements.






    🎉 🎉 🎉






    Stay tuned...



    In my next post, I’ll share the code experiments I conducted to implement the proposed functionality. So, stay tuned for more updates on my progress!

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    1 Quelle
    GuardBreaker: Derailing AI-assisted malware analysis with a code comment
    1 Quelle
    Attack hides malware in PNGs and drops custom reverse tunnel on victims' machines
    1 Quelle
    33-hour BGP hijack of Softaculous traffic prompts security scramble
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten GCC: Automatic Function Multi-Versioning Pt.1

    Thematisch verwandte Begriffe: Automatic, Function, MultiVersioning · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...