summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2012-11-15 21:48:15 +0000
committermiod <miod@openbsd.org>2012-11-15 21:48:15 +0000
commitff385ce478f0d42146acbb1036ae30279941e715 (patch)
treed6cec5260bae39b69546bc539378651d7ba6738d /usr.bin/mandoc
parentMake this cross-compile friendly by defining ATTRIBUTE_UNUSED to an empty (diff)
downloadwireguard-openbsd-ff385ce478f0d42146acbb1036ae30279941e715.tar.xz
wireguard-openbsd-ff385ce478f0d42146acbb1036ae30279941e715.zip
Only allow the "return" insn construct (which simply yields a "jmp r1" line)
if null_prologue(), i.e. if there is no stack frame to undo and no r1 to restore. Make the "epilogue" insn construct no longer depend on "return", but rather on "(use (const_int 0))" as "prologue" and as generally done on other backends. On the other hand, make it unconditionnal, instead of "! null_prologue()". These changes make sure than a leaf procedure call does not end up "returning" (i.e. jmp r1) upon return from the call, without restoring r1 and r30 (whenever applicable) from the existing stack frame. This makes a gcc3-compiled __main() (from libgcc2.c) no longer spin after invoking the constructors, and gives the real payload (i.e. main() and whatever follows from there) a chance to run.
Diffstat (limited to 'usr.bin/mandoc')
0 files changed, 0 insertions, 0 deletions