This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Passing Annotations/Labels to Symbol Table


VJ <Vijay.Janapareddi@colorado.edu> writes:

> I need to modify gcc so as to add customized Labels for instructions in an ELF
> binary after it is done optimizing the code and to then make it output a symbol
> for the labeled instruction so that I can view the label in the symbol table.
> 
> For example, I need to label every load instruction in a function with a unique
> ID and to make that ID show up as a symbol in the symbol table along with the
> memory address of the load instruction corresponding to the ID.

Edit the .md file and .c file for your target to add a label for each
instruction.

Or it would probably be simpler to write a little post-processor which
transformed the .s file and added labels.  Then run gcc with -S, run
your post-processor, and then run gcc with -c on the output.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]