[PATCH] D64555: [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 07:39:44 PDT 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: test/tools/obj2yaml/invalid-reloc.test:1
+## Check yaml2obj is able to dump a broken relocation
+## that has no symbol associated.
----------------
MaskRay wrote:
> jhenderson wrote:
> > What exactly is broken about the relocation? It's valid for some kinds of relocations to have no symbol.
> > 
> > I think this test needs renaming and the comment updating.
> asan instrumentation may generate `R_*_NONE` for debug info. ld -r may generate `R_*_NONE`. They are used as placeholders when no reasonable relocation is available. In this sense, they are indeed "broken". 
> 
> However, here it is probably better to say that a symbol index of 0 can be dumped...
Yeah. I based my comment on the initial comment (rL293224):

```
R_X86_64_NONE can be emitted without a symbol associated (well,
in theory it should never be emitted in an ABI-compliant relocatable
object). So, if there's no symbol associated to a reloc, emit one
with an empty name, instead of crashing.

```

I'll rephrase.


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

https://reviews.llvm.org/D64555





More information about the llvm-commits mailing list