[PATCH] D80390: [WIP][mips] Support 64-bit relative relocations

Joe Holden via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 30 10:03:11 PDT 2020


joewholden added a comment.

In D80390#2064903 <https://reviews.llvm.org/D80390#2064903>, @MaskRay wrote:

> In D80390#2064895 <https://reviews.llvm.org/D80390#2064895>, @joewholden wrote:
>
> > Ok so, just stumbled upon one issue but I'm not yet sure where the problem lies given how bad mips support is in Go:
> >
> > ld: error: section type mismatch for .debug_line
> >
> > >>> /tmp/go-link-985122218/000010.o:(.debug_line): SHT_MIPS_DWARF
> > >>>  output section .debug_line: SHT_PROGBITS
> >
> > I'm still testing though, so I'll see what I uncover...
>
>
> According to https://github.com/llvm/llvm-project/blob/master/llvm/lib/MC/MCObjectFileInfo.cpp#L404 , .debug_line on MIPS should use `SHT_MIPS_DWARF` (different from all other targets). Go produced assembly should do the same. LLD has such a rigorous check for section type compatibility.


Go actually produces binaries that trip LLVM up quite often - another example is llvm-strip, I should probably file another bug for that though

GNU binutils are much more relaxed when it comes to these checks, so I expect Go elf tools don't get properly tested


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80390/new/

https://reviews.llvm.org/D80390





More information about the llvm-commits mailing list