This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header
> #if __GNUC__ >= 2
> /* Define BFD64 here, even if our default architecture is 32 bit ELF
> as this will allow us to read in and parse 64bit and 32bit ELF
> files.
> Only do this if we believe that the compiler can support a 64 bit
> data type. For now we only rely on GCC being able to do this. */
> #define BFD64
> #endif
>
> ....
> #include "dwarf.h"
> ---
>
> dwarf_vma should be the same inside and outside of readelf.c.
This means, if I understand this correctly that
if I compile a 32 bit readelf executable
bfd_vma will be a 64-bit integer inside readelf.c,
but a 32-bit integer in dwarf.c.
dwarf.c still mainly uses bfd_vma
and has dwarf_vma only for one function
get_encoded_value...
Should read_leb128 (and maybe other functions within
dwarf.c) also be changed to use
dwarf_vma rather than bfd_vma in that case?
Pierre