This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Passing Annotations/Labels to Symbol Table
- From: Ian Lance Taylor <ian at airs dot com>
- To: VJ <Vijay dot Janapareddi at colorado dot edu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 12 Jan 2005 20:39:45 -0500
- Subject: Re: Passing Annotations/Labels to Symbol Table
- References: <1105574093.41e5b8cd18791@webmail.colorado.edu>
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