On 03/07/2019 11:47, Jan Beulich wrote: >>>> On 24.05.19 at 17:15, <andrew.coop...@citrix.com> wrote: >> --- a/tools/tests/x86_emulator/Makefile >> +++ b/tools/tests/x86_emulator/Makefile >> @@ -149,7 +149,7 @@ $(addsuffix .h,$(TESTCASES)): %.h: %.c testcase.mk >> Makefile >> (echo 'static const unsigned int __attribute__((section(".test, >> \"ax\", @progbits #")))' \ >> "$${prefix}_$(arch)$${flavor}[] = {"; \ >> od -v -t x $*.bin | sed -e 's/^[0-9]* /0x/' -e 's/ /, 0x/g' -e >> 's/$$/,/'; \ >> - echo "};") >>$@.new; \ >> + echo "}; asm(\".type $${prefix}_$(arch)$${flavor}, >> STT_FUNC;\");") >>$@.new; \ > While I think we've sufficiently agreed on future gas behavior > that I'd consider this change fine to make as long as you add > an intermediate step going through STT_NOTYPE, I'd like to note > that your mileage from this will only be about 50%: While the > 64-bit blobs will disassemble fine, I'm afraid the 32-bit ones > will be somewhat garbled. Sadly there's no annotation or alike > (like Arm's mapping symbols) that one could use to make > disassemblers switch bitness for separate blocks of code.
Thats fine. Disassembling twice, once with -mi386 works well, as the symbol names still get emitted sensibly. I even use -m i8086 for bits of Xen's trampoline. Its rare to need to look at a different disassembly, but its very easy to do so if you need to. Can I take this reply as an ack for using the STT_NOTYPE intermediate step? ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel