public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* develop a 'customized ld'
@ 2005-09-10 17:16 sean yang
  2005-09-10 17:43 ` Simon Richter
  0 siblings, 1 reply; 15+ messages in thread
From: sean yang @ 2005-09-10 17:16 UTC (permalink / raw)
  To: binutils

Hi folks,
I am looking at the source codes in ld directory(source code related to the 
linker) as I want to develop a slightly different linker. Basically, what I 
want to do is to find the address of some instructions in a program at link 
time.

For example, I want to find the program counter(i.e., the address of the 
instruction) of "call '@foo'" instruction at link time.
#demo.c
extern int foo(int);
int main(){
  int i, j;
  i=foo(1); //which will be compiled to something like "push 1; call 
@foo;..."
  j=foo(i);
}//the assebly code is not syntatically correct--only try to show my goal.

Conceptually, this doesn't seem to need much code modification---keep most 
pass intact and add a customized pass to achieve what i want. ld is a quite 
big project to me, honestly. And this is my first time to touch it. Could 
someone give me some hint where should I start? Can any expert assess the 
difficulty of achieving such functionality?

Thanks,
Sean

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <22080b0a050910225221633402@mail.gmail.com>]

end of thread, other threads:[~2006-03-03 22:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-10 17:16 develop a 'customized ld' sean yang
2005-09-10 17:43 ` Simon Richter
2005-09-10 19:04   ` Ian Lance Taylor
2005-09-10 19:17     ` Daniel Jacobowitz
2005-09-11  5:39       ` sean yang
2005-09-11  5:53         ` Ian Lance Taylor
2005-09-11  7:41           ` sean yang
2005-09-11 14:16             ` Ravi Ramaseshan
2005-09-12 15:28               ` sean yang
2005-09-30 11:13                 ` Nick Clifton
2005-09-30 18:53                   ` sean yang
2006-03-03 22:24                   ` about libc function interfaces and ld --wrap sean yang
2006-03-03 22:34                     ` Daniel Jacobowitz
2005-09-11  5:31   ` develop a 'customized ld' sean yang
     [not found] <22080b0a050910225221633402@mail.gmail.com>
2005-09-30 18:48 ` sean yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).