When compiling with the -S flag, I need to be able to modify what gets written. As a first step I'd like to be able to just print out "Hello World!" somewhere in the main.s file.
I know I need to modify some gcc code and recompile gcc, but I'm having trouble finding the file that I need to change.
Any help would be great.
Thank you.
What?
It's not clear to me what you're trying to do...
Do you want to modify gcc so that it outputs different assembler code?
Or do you want to modify the assembler code created by gcc, then assemble it?
Either way, I don't really see why you would need to modify the gcc source code.
To modify assembler code created by gcc on the fly:
(That was hard, wasn't it?)
To modify and assemble asm code created by gcc:
clarification
I want to add code to the source code of gcc, then recompile gcc, so that it outputs different assebly code with no flags ( other than -S). This is part of a bigger project and I figured a good first step would be being able to insert a line into the assembly code. Thanks.