- tcc_add_linker_symbols():
don't add for dlls
- bind_exe_dynsym():
update _end symbol when done
allow data definition in the .so override a bss symbol
in the exe. For example
exe: int x;
.so: int x = 123;
- set_elf_sym():
cannot compare section numbers with symbols from dlls
tcc_load_obj():
return -1 from symbol conflict errors
tests/tests2/148_linker_symbols:
- use only one file
- make it print useful output rather than just "2 errors."
In general, the tests2 setup with .expect files is meant
to compare text output. For example:
printf("val = %d\n", val);
.expect file can be generated or refreshed using
make tests2.nnn+
or in order to force generation with tcc itself
make tests2.nnn+ GEN-CC='$(GEN-TCC)'
tccgen.c:
- __attribute__((section(...))) : set section type/flags
according to first usage
- fix bcheck bounds for -fcommon
The traditional boundary symbols were recorded against the canonical .text, .data and .bss sections before dynamic binding and final layout. Separately named allocatable sections and copy-relocated data could therefore fall outside the advertised ranges.
Track definitions synthesized by the linker and finalize them from the ordered loadable sections. Refresh both regular and dynamic symbol tables, and give the plain etext, edata and end names PROVIDE semantics on every ELF target while preserving user definitions.
Cover archive references, overrides, copy relocations and independently named text/data/bss sections.
Reported-by: Richard Wheeler <18647491+PythonWillRule@users.noreply.github.com>