Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mips: add CFI directives to assembler sources, NDMS-1223
CFI directives moved to .debug_frame section (instead of .eh_frame) since these may be removed by a strip utility.
- Loading branch information
Showing
9 changed files
with
57 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
.cfi_sections .debug_frame | ||
.set noreorder | ||
|
||
.section .init | ||
.global _init | ||
.type _init,@function | ||
.align 2 | ||
_init: | ||
.cfi_startproc | ||
subu $sp,$sp,32 | ||
.cfi_adjust_cfa_offset 32 | ||
sw $gp,24($sp) | ||
.cfi_rel_offset $gp, 24 | ||
sw $ra,28($sp) | ||
.cfi_rel_offset $ra, 28 | ||
.cfi_endproc | ||
|
||
.section .fini | ||
.global _fini | ||
.type _fini,@function | ||
.align 2 | ||
_fini: | ||
.cfi_startproc | ||
subu $sp,$sp,32 | ||
.cfi_adjust_cfa_offset 32 | ||
sw $gp,24($sp) | ||
.cfi_rel_offset $gp, 24 | ||
sw $ra,28($sp) | ||
.cfi_rel_offset $ra, 28 | ||
.cfi_endproc |
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
.cfi_sections .debug_frame | ||
.set noreorder | ||
|
||
.section .init | ||
.cfi_startproc | ||
lw $gp,24($sp) | ||
lw $ra,28($sp) | ||
j $ra | ||
addu $sp,$sp,32 | ||
.cfi_adjust_cfa_offset -32 | ||
.cfi_endproc | ||
|
||
.section .fini | ||
.cfi_startproc | ||
lw $gp,24($sp) | ||
lw $ra,28($sp) | ||
j $ra | ||
addu $sp,$sp,32 | ||
.cfi_adjust_cfa_offset -32 | ||
.cfi_endproc |
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 |
---|---|---|
@@ -1,17 +1,24 @@ | ||
.cfi_sections .debug_frame | ||
.set noreorder | ||
.global dlsym | ||
.hidden __dlsym | ||
.type dlsym,@function | ||
dlsym: | ||
.cfi_startproc | ||
lui $gp, %hi(_gp_disp) | ||
addiu $gp, %lo(_gp_disp) | ||
addu $gp, $gp, $25 | ||
move $6, $ra | ||
lw $25, %call16(__dlsym)($gp) | ||
addiu $sp, $sp, -16 | ||
.cfi_adjust_cfa_offset 16 | ||
sw $ra, 12($sp) | ||
.cfi_rel_offset $ra, 12 | ||
jalr $25 | ||
nop | ||
lw $ra, 12($sp) | ||
.cfi_restore $ra | ||
jr $ra | ||
addiu $sp, $sp, 16 | ||
.cfi_adjust_cfa_offset -16 | ||
.cfi_endproc |
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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
.cfi_sections .debug_frame | ||
.set noreorder | ||
|
||
.global __restore_rt | ||
.hidden __restore_rt | ||
.type __restore_rt,@function | ||
__restore_rt: | ||
.cfi_startproc | ||
li $2, 4193 | ||
syscall | ||
.cfi_endproc | ||
|
||
.global __restore | ||
.hidden __restore | ||
.type __restore,@function | ||
__restore: | ||
.cfi_startproc | ||
li $2, 4119 | ||
syscall | ||
.cfi_endproc |
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
.cfi_sections .debug_frame | ||
.set noreorder | ||
.global __unmapself | ||
.type __unmapself,@function | ||
__unmapself: | ||
.cfi_startproc | ||
move $sp, $25 | ||
.cfi_undefined $sp | ||
.cfi_def_cfa_offset 0 | ||
li $2, 4091 | ||
syscall | ||
li $4, 0 | ||
li $2, 4001 | ||
syscall | ||
.cfi_endproc |
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
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