tccelf: use rodata_section, use more rodata in tcc itself
commit72f1dea5372ed551d203311e4f2ab769a54de9bd
authorgrischka <grischka>
Mon, 1 Feb 2021 14:10:58 +0000 (1 15:10 +0100)
committergrischka <grischka>
Thu, 18 Feb 2021 13:43:34 +0000 (18 14:43 +0100)
tree598dca2e2eea9e6c91cf1f4ae6dccd653e86e770
parent02795106e154d0daa6cd525415b44db0298e6c3a
tccelf: use rodata_section, use more rodata in tcc itself

libtcc.c: add -Wwrite-strings to -Wall
tccgen.c: ro float-consts, string-consts, ro arrays if base type is
tccpe.c: merge IAT with rodata
tccrun.c: mprotect rodata accordingly. free section data after copy
x86_64.c: do not use got for static data.
tcc -bench: show data.rw/ro

Probably STB_LOCAL should never get to put_got_entry(), and currently
it doesn't seem to happen (See "Hack Alarm" there)

Other files: use more ro-data in tinycc
18 files changed:
arm-asm.c
arm-gen.c
arm64-gen.c
c67-gen.c
i386-asm.c
i386-gen.c
libtcc.c
riscv64-gen.c
tcc.h
tccelf.c
tccgen.c
tccmacho.c
tccpe.c
tccpp.c
tccrun.c
tcctools.c
tests/tests2/96_nodata_wanted.c
x86_64-gen.c