This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: develop a 'customized ld'





From: Simon Richter <Simon.Richter@hogyros.de>
To: sean yang <seanatpurdue@hotmail.com>
CC: binutils@sourceware.org
Subject: Re: develop a 'customized ld'
Date: Sat, 10 Sep 2005 19:15:40 +0200

Hi,

sean yang wrote:

> For example, I want to find the program counter(i.e., the address of the
> instruction) of "call '@foo'" instruction at link time.

This can be done for assembler code, but obvoisly not for C code as
there is no way to make sure the C compiler will always use the same
instructions. Just declare an assembler label in front of the
instruction of which you want to take the address.
~~~~~~~~~~~~~~~~~at assemble time, the address are still not resolved as the virtual address which is the address that instruction to be loaded to at runtime. i.e., all addresses produced by assembler are still relative address. How can I get what I need by modifying assembler? Maybe I missed some of your points. Could you give more details?

Thanks,
Sean



Simon


<< signature.asc >>

_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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