tests/x86emul: Annotate test blobs as executable code

This causes objdump to disassemble them, rather than rendering them as
straight hex data.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2019-08-06 11:32:08 +01:00
1 parent 060f4eee0f
commit 3a9205788b
1 file changed
+8 -2
+8 -2
View File
@@ -191,7 +191,10 @@ $(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 "};"; \
echo "asm(\".type $${prefix}_$(arch)$${flavor}, STT_NOTYPE;\");"; \
echo "asm(\".type $${prefix}_$(arch)$${flavor}, STT_FUNC;\");"; \
) >>$@.new; \
rm -f $*.bin; \
done; \
)
@@ -207,7 +210,10 @@ $(addsuffix -opmask.h,$(OPMASK)): %.h: opmask.S 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 "};"; \
echo "asm(\".type $${prefix}_$(arch)$${flavor}, STT_NOTYPE;\");"; \
echo "asm(\".type $${prefix}_$(arch)$${flavor}, STT_FUNC;\");"; \
) >>$@.new; \
rm -f $*.bin; \
done; \
)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.