[PATCH] D58677: [llvm-readobj]Add additional testing for various ELF features

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 04:23:19 PST 2019


grimar added inline comments.


================
Comment at: test/tools/llvm-readobj/elf-dynamic-tags.test:275
+      - Tag:   0x7ffffffe
+        Value: 0x8888777766665555
+      - Tag:   DT_NULL
----------------
jhenderson wrote:
> grimar wrote:
> > Could you explain the logic of numeric tags for me?
> > 
> > I see you're testing LOPROC and (HIPROC-1) it seems:
> > 
> > > DYNAMIC_TAG_MARKER(LOOS, 0x60000000)   // Start of environment specific tags.
> > > DYNAMIC_TAG_MARKER(HIOS, 0x6FFFFFFF)   // End of environment specific tags.
> > > DYNAMIC_TAG_MARKER(LOPROC, 0x70000000) // Start of processor specific tags.
> > > DYNAMIC_TAG_MARKER(HIPROC, 0x7FFFFFFF) // End of processor specific tags.
> > 
> > But what is 0x6000000D and 0x6ffff000 then?
> I can't remember my own logic now!
> 
> I'm interested in other reserved values effectively, that don't have a known meaning in LLVM, but looking at the known values, I don't see any reason to not use 0x60000000. Note that 0x6FFFFFFF is DT_VERNEEDNUM, so I can't use that. The highest I can use is 0x6FFFFFF8, I believe. I could also test a mid-range value too, if that's desirable?
> 
> By the way, I'm using 0x7ffffffe, because 0x7fffffff is DT_FILTER.
Not sure about 0x7ffffffe, because it is surrounded by DT_AUXILIARY(0x7FFFFFFD) and DT_FILTER(0x7FFFFFFF),
I guess someone might want to use it one day.

Seems to test that we can work with unknown tags you can just test a single value and perhaps any
obviously unused/weird value like 0x6ABCDEF0 would work here?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58677





More information about the llvm-commits mailing list