decompals / slinky

Linker script generator for decompilation and modding projects
MIT License
8 stars 0 forks source link

Option to specify an alignment for each section start #66

Closed AngheloAlf closed 2 months ago

AngheloAlf commented 6 months ago

With a syntax like this

settings:
  section_start_alignment: { .text: 128, .rodata: 0x40, .sdata: 0x8 }

Which would produce something like this

        . = ALIGN(., 0x80);
        boot_TEXT_START = .;
        build/src/boot/boot_main.o(.text*);

        // ...

        . = ALIGN(., 0x40);
        boot_RODATA_START = .;
        build/src/boot/boot_main.o(.rodata*);

        // ...

        . = ALIGN(., 0x8);
        boot_SDATA_START = .;
        build/src/boot/boot_main.o(.sdata*);