diff options
author | Rich Felker <dalias@aerifal.cx> | 2016-02-04 23:01:03 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-02-04 23:01:03 +0000 |
commit | 756c8af8589265e99e454fe3adcda1d0bc5e1963 (patch) | |
tree | 8de0abc5bc1ed79f72f4da99b795cd0333416e31 /src/thread/tss_delete.c | |
parent | aecda35373511c5bf02c0f708bd262adb1a09287 (diff) | |
download | musl-756c8af8589265e99e454fe3adcda1d0bc5e1963.tar.gz musl-756c8af8589265e99e454fe3adcda1d0bc5e1963.tar.bz2 musl-756c8af8589265e99e454fe3adcda1d0bc5e1963.tar.xz musl-756c8af8589265e99e454fe3adcda1d0bc5e1963.zip |
in mips cancellable syscall asm, don't assume gp register is valid
the old __cp_cancel code path loaded the address of __cancel from the
GOT using the $gp register, which happened to be set to point to the
correct GOT by the calling C function, but there is no ABI requirement
that this happen. instead, go the roundabout way and compute the
address of __cancel via pc-relative and gp-relative addressing
starting with a fake return address generated by a bal instruction,
which is the same trick crt1 uses to bootstrap.
Diffstat (limited to 'src/thread/tss_delete.c')
0 files changed, 0 insertions, 0 deletions