This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to create a library which contains absolute addresses of exported functions?
- From: DJ Delorie <dj at redhat dot com>
- To: "PRC" <panruochen at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: 05 Mar 2008 22:45:13 -0500
- Subject: Re: How to create a library which contains absolute addresses of exported functions?
- References: <200803061132055669808@gmail.com>
You can create a .S file that has entries like this:
.global strcpy
strcpy = 0x80001600
.global vsprintf
vsprintf = 0x80002290
.global memmove
memmove = 0x80001e50
If you assemble that and put it in your library, it will do the same
thing, without the linker script or .c file.
You could do one symbol per .S file if you wanted to.