BSD linker scripts contain special cases to add NOP padding to code sections. Syntax is next:
.init: { KEEP (*(.init)) } =0x90909090
(0x90 is NOP)
This patch implements that functionality.
Differential D17269
[ELF] - Implemented linkerscript sections padding. grimar on Feb 15 2016, 7:51 AM. Authored by
Details
Diff Detail Event Timeline
Comment Actions
|
This is not a right place to add this code. You want to add code to OutputSection<ELFT>::writeTo instead. I think the following code should suffice as an initial implementation.