Re: Passing Annotations/Labels to Symbol Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



VJ <Vijay.Janapareddi@xxxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux