public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] linker
@ 2002-11-26 16:14 Abhijit Kadlag
  2002-11-26 17:47 ` Jim Wilson
  2002-11-26 22:49 ` Ian Wienand
  0 siblings, 2 replies; 3+ messages in thread
From: Abhijit Kadlag @ 2002-11-26 16:14 UTC (permalink / raw)
  To: linux-ia64

i am trying to instrument the elf-binaries
on itanium. the task is to write a tool
like 'pixie' available on sgi machines.
 since i need to add counters for each basic block, which
have to be in memory, i need some way of referencing memory.
all i could find is itanium has only register indirect mode
of specifying memory address and then again loading
an address is done by the linker. i tried looking 
at the dis-assmebled code to discover how the linker
does the offset calculation, but i could not find
any correlation between program order of declaring
variables and their offsets , which are added to r1(gp).
 does it use the sections like .got or .plt in 
elf binary ? if yes, how ? 
  shall anyone please tell me , how to add instructions
to the binary of an executable,
which can specify the memory they want to 
access?
 

-- 
----------------------
Abhijit Kadlag
I sem ME,CSE,
Dept. of CSA,
IISc,Banagalore.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-ia64] linker
  2002-11-26 16:14 [Linux-ia64] linker Abhijit Kadlag
@ 2002-11-26 17:47 ` Jim Wilson
  2002-11-26 22:49 ` Ian Wienand
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Wilson @ 2002-11-26 17:47 UTC (permalink / raw)
  To: linux-ia64

This isn't a topic that can be easily explained in a few mail messages.

There is a book authored by John R Levine _Linkers and Loaders_.  I haven't
read it myself, but I hear it is very good.
http://www.amazon.com/exec/obidos/tg/detail/-/1558604960/ref=lib_rd_btb/102-4344578-4148946?v=glance&s=books

You can find useful info in the various IA-64 ABI documents.  The psABI and
the Software Conventions and Runtime Architecture documents in particular.
These are available via download from the Intel web page for Itanium.
        http://developer.intel.com/design/itanium/arch_spec.htm
See also the ELF standard (gABI), which is available from SCO/Caldera.
        http://www.caldera.com/developers/gabi

You can also learn a bit by using objdump and readelf to pretty print the
contents of an ELF file.  You can also learn a lot by spending time looking
at and/or tracing through the GNU ld sources, though this may take some time.

Jim


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-ia64] linker
  2002-11-26 16:14 [Linux-ia64] linker Abhijit Kadlag
  2002-11-26 17:47 ` Jim Wilson
@ 2002-11-26 22:49 ` Ian Wienand
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Wienand @ 2002-11-26 22:49 UTC (permalink / raw)
  To: linux-ia64

On Tue, Nov 26, 2002 at 12:47:53PM -0500, Jim Wilson wrote:
> There is a book authored by John R Levine _Linkers and Loaders_.  I haven't
> read it myself, but I hear it is very good.
> http://www.amazon.com/exec/obidos/tg/detail/-/1558604960/ref=lib_rd_btb/102-4344578-4148946?v=glance&s=books

this book is available online in it's pre-release format at
http://www.iecc.com/linkers/

another good resource is "how to write shared libraries" by Ulrich
Drepper (http://people.redhat.com/drepper/dsohowto.pdf)

-i
ianw@gelato.unsw.edu.au



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-26 22:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-26 16:14 [Linux-ia64] linker Abhijit Kadlag
2002-11-26 17:47 ` Jim Wilson
2002-11-26 22:49 ` Ian Wienand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox