[llvm-commits] [llvm] r136855 - in /llvm/trunk: lib/MC/ELFObjectWriter.cpp lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp test/MC/ELF/x86_64-reloc-sizetest.s

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Thu Aug 4 13:02:48 PDT 2011


>     For the symbol value your asserts looks correct, but you might want to
>     account for the relocation being signed or unsigned too.
>
>
> Do you mean preserve the signedness of the target specific reloc tag
> specification? Hmm..

I think that instead of doing

isInt<8>(Value) || isUInt<8>(Value)

You can assert only one or the other depending on the relocation.

>     This also found a bug on the elf dumper, since it is only printing 32
>     bits of the addend.
>
>     I will try to take a look at adding back an assert for the addend and
>
>
> My initial idea was to add a new virtual at ELFObjectWriter-
>   CheckRelocSizeBounds(ERE)  but decided against it.
> If you really want to check the addend also, perhaps its best done there.
> What do you think?

There are not that many relocations on X86, so my first try would be a 
switch.

> -jason
>

Cheers,
Rafael




More information about the llvm-commits mailing list