This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ELF_R_SYM question
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Elias Athanasopoulos <eathan at otenet dot gr>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 19 Oct 2002 12:45:52 -0700
- Subject: Re: ELF_R_SYM question
- References: <20021019225836.L2391@neutrino.particles.org>
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.