-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'referred-string' into 'main'
Give one data_object_point for referred string Closes debloating/dykondo#154 See merge request rewriting/ddisasm!1232
- Loading branch information
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
all: ex_original.s | ||
gcc ex_original.s -no-pie -Wl,-Ttext=0x512350 -o ex | ||
@ ./ex > out.txt | ||
clean: | ||
rm -f ex out.txt ex.gtirb | ||
rm -fr ex.unstripped ex.s *.old* dl_files *.gtirb | ||
check: | ||
@ ./ex > /tmp/res.txt | ||
@ diff out.txt /tmp/res.txt && echo TEST OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.text | ||
|
||
.globl main | ||
.type main, @function | ||
main: | ||
.LFB6: | ||
pushq %rbp | ||
movq %rsp, %rbp | ||
movl $mystring, %edi | ||
call puts | ||
movl $0, %eax | ||
popq %rbp | ||
ret | ||
|
||
.LFE6: | ||
.size main, .-main | ||
|
||
.align 8 | ||
.data | ||
|
||
.quad mydata | ||
.zero 8 | ||
# 0x512350 happens to be the address of `_start` (see the Makefile). | ||
# This example is to test that this address is not symbolized as `_start` | ||
# This program is supposed to print out "#Q". | ||
# If this address is symbolized as `_start`, | ||
# it will print out something else. | ||
.ascii "P" # 0x50 | ||
mystring: | ||
.string "#Q" # 0x23 0x51 | ||
.byte 0x0 | ||
.byte 0x0 | ||
.byte 0x0 | ||
.byte 0x0 | ||
|
||
mydata: | ||
.zero 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters