mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[build] Warn on zero-length symbols when building symbol table
Make build_symbol_table.py output statistics on the symbol table it builds, and emit warnings for zero-length symbols. Also added lengths to several functions defined in asm that this uncovered.
This commit is contained in:
@@ -1,33 +1,39 @@
|
||||
global get_rsp: function hidden
|
||||
global get_rsp: function hidden (get_rsp.end - get_rsp)
|
||||
get_rsp:
|
||||
mov rax, rsp
|
||||
ret
|
||||
.end:
|
||||
|
||||
global get_rip: function hidden
|
||||
global get_rip: function hidden (get_rip.end - get_rip)
|
||||
get_rip:
|
||||
pop rax ; do the same thing as 'ret', except with 'jmp'
|
||||
jmp rax ; with the return address still in rax
|
||||
.end:
|
||||
|
||||
global get_caller: function hidden
|
||||
global get_caller: function hidden (get_caller.end - get_caller)
|
||||
get_caller:
|
||||
; No prelude - don't touch rsp or rbp
|
||||
mov rax, [rbp+8]
|
||||
ret
|
||||
.end:
|
||||
|
||||
global get_grandcaller: function hidden
|
||||
global get_grandcaller: function hidden (get_grandcaller.end - get_grandcaller)
|
||||
get_grandcaller:
|
||||
; No prelude - don't touch rsp or rbp
|
||||
mov rax, [rbp]
|
||||
mov rax, [rax+8]
|
||||
ret
|
||||
.end:
|
||||
|
||||
global get_gsbase: function hidden
|
||||
global get_gsbase: function hidden (get_gsbase.end - get_gsbase)
|
||||
get_gsbase:
|
||||
rdgsbase rax
|
||||
ret
|
||||
.end:
|
||||
|
||||
global _halt: function hidden
|
||||
global _halt: function hidden (_halt.end - _halt)
|
||||
_halt:
|
||||
hlt
|
||||
jmp _halt
|
||||
.end:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user