[llvm-commits] [PATCH] Support/ELF.h extensions
Chris Lattner
clattner at apple.com
Mon Jul 12 08:52:31 PDT 2010
On Jul 12, 2010, at 7:56 AM, Stephen Wilson wrote:
> Hi Rafael,
>
> Rafael Espindola <espindola at google.com> writes:
>
>> On 10 July 2010 18:02, Stephen Wilson <wilsons at start.ca> wrote:
>> On linux I also have
>>
>> EI_OSABI 7
>> EI_ABIVERSION 8
>> EI_PAD 9
>>
>> Not sure if those are important for us now.
>
> Should probably be included for the sake of completeness. Updated patch
> attached.
A few stylistic updates:
- unsigned char getFileClass () const { return e_ident[4]; }
- unsigned char getDataEncoding () { return e_ident[5]; }
+ unsigned char getFileClass () const { return e_ident[EI_CLASS]; }
+ unsigned char getDataEncoding () { return e_ident[EI_DATA]; }
Not your doing, but please don't put a space before argument lists: use getFileClass() instead of getFileClass ()
Likewise here:
Elf64_Quarter e_shstrndx;
+ bool checkMagic () const {
+ return (memcmp (e_ident, ElfMagic, strlen (ElfMagic))) == 0;
+ }
+ unsigned char getFileClass () const { return e_ident[EI_CLASS]; }
+ unsigned char getDataEncoding () { return e_ident[EI_DATA]; }
and in Elf64_Sym. Do you have commit access? If so, please commit with these tweaks. If not, please read the DeveloperPolicy.html document and send me the requested info (offline).
Thanks Stephen!
-Chris
More information about the llvm-commits
mailing list