This is the mail archive of the
mailing list for the binutils project.
Re: windres - Native resources?
- From: nick clifton <nickc at redhat dot com>
- To: Jean-Claude Gervais <jc dot gervais at videotron dot ca>
- Cc: binutils at sourceware dot org
- Date: Tue, 27 Nov 2012 17:37:41 +0000
- Subject: Re: windres - Native resources?
- References: <1352405331.32246.21.camel@andromeda>
Sorry for taking so long to reply to your email.
[ 0](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .rsrc
Apparently (I may be wrong, please feel free to correct me) the object
file contains one symbol called .rsrc that the Windows API functions
must somehow locate and use to find the resources.
What I would like to do is access the .rsrc symbol directly, in plain c
How can I obtain a pointer to the symbol? The compiler doesn't seem to
be able to find the symbol if I declare an extern char called rsrc.
That is because the symbol names inside programs cannot start with a
period, and even if you leave that off, the compiler automatically
prepends an underscore to the symbol name. The trick however, assuming
that you are using gcc, is to use an asm directive, as in:
extern int rsrc asm (".rsrc");
For example, I tried the following command:
windres --target=elf64-ia64-little -i resource.rc -o resource.o
But windres complains about not being able to detect the architecture.
How do I tell it the architecture type?
> What are the possible values?
These should be listed in the output of "windres --help".