text relocation for netbsd
commit0821940e26ab74e2cfa668fcb145fe22e7baa8f0
authorherman ten brugge <hermantenbrugge@home.nl>
Wed, 30 Dec 2020 13:08:06 +0000 (30 14:08 +0100)
committerherman ten brugge <hermantenbrugge@home.nl>
Wed, 30 Dec 2020 13:08:06 +0000 (30 14:08 +0100)
tree3d81b514c13bef66530ebf76d45308dc1c1d5569
parentc13c434383c7bdd88f5e439d72f4c161c03b9ec9
text relocation for netbsd

netbsd does not allow text relocations in text segment.

tcc.h:
- Add data_ro_section
- Fix typo rela.plt

tccelf.c:
- Add data_ro_section
- Make bounds_section/lbounds_section rw
- Add GNU_RELRO section for data_ro_section/bounds_section/lbounds_section
- Fix relocation for __dso_handle in atexit()

tccgen.c:
- Use data_ro_section

x86_64-gen.c:
- Use R_X86_64_PC32 instead of R_X86_64_64 for bounds checking

tests/Makefile, tests/tests2/Makefile
- Enable dll tests for netbsd
tcc.h
tccelf.c
tccgen.c
tests/Makefile
tests/tests2/Makefile
x86_64-gen.c