View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum ↗

iraf-v216 · Code · Issues (50) · Pull requests (81)

iraf.net pull request #45

[linux64] Call the PLT for __sigsetjmp instead of calling directly

merge olebole merged 1 commit to iraf-community/iraf


olebole commented on 2017-05-08

Otherwise, one may get a linker error on modern systems (Debian Stretch, Ubuntu 17.04 etc.).
To reproduce this error, just create an empty main and try to link:

$ echo 'int main(void) {}' > main.c  
$ gcc main.c unix/as.linux64/zsvjmp.s -o main  
/usr/bin/ld: /tmp/cceS36ym.o: relocation R_X86_64_PC32 against symbol `__sigsetjmp@[@GLIBC_2](https://github.com/GLIBC_2).2.5' can not be used when making a shared object; recompile with -fPIC  
/usr/bin/ld: final link failed: Bad value  
collect2: error: ld returned 1 exit status  

I took the opportunity to add a few metadata (.section, .type) to the file.
This is also tested to work on older systems (back to Debian Lenny from 2009), so it is backwards compatible.


Commits


Last updated on 2017-10-27