ELF_R_SYM question

H. J. Lu hjl@lucon.org
Sat Oct 19 12:45:00 GMT 2002


On Sat, Oct 19, 2002 at 10:58:36PM +0300, Elias Athanasopoulos wrote:
> Hi all,
> 
> >From bfd/elfcode.h:
> 
> #if ARCH_SIZE == 64
> #define ELF_R_SYM(X)    ELF64_R_SYM(X)
> 
> #if ARCH_SIZE == 32
> #define ELF_R_SYM(X)    ELF32_R_SYM(X)
> 
> Now, is preferable to use ELF_R_SYM in the code (in all cases) or
> use explicitly the ELF64/32_R_SYM macros?
> 
> Having done a quick grepping, I saw that all three macros are used in
> various places. Is it correct?

Some files, like elflink.h and elfcode.h, are included by both 64bit
and 32bit ELF targets. You can't use ELF64_R_SYM nor ELF32_R_SYM.


H.J.



More information about the Binutils mailing list