[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tests/x86emul: Annotate test blobs as executable code



commit 3a9205788bdabb2a23d2fa3b85637b2e629d19e5
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri May 24 16:14:53 2019 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Aug 6 11:32:08 2019 +0100

    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@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 tools/tests/x86_emulator/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/tests/x86_emulator/Makefile 
b/tools/tests/x86_emulator/Makefile
index a3a65556b6..b9312e0044 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -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; \
        )
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.