mirror of
https://github.com/mirror/tinycc.git
synced 2026-08-18 11:03:27 +08:00
dynamic executables (PIE)
Allows to create dynamic executables, using the code path
for TCC_OUTPUT_DLL but add an .interp header (plus a FLAGS_1
entry in the dynamic section to make 'readelf' say "PIE")
Introduces TCC_OUTPUT_DYN as alias for TCC_OUTPUT_DLL.
There is no runtime option, only one to configure:
./configure --config-pie
100 insertions(+), 76 deletions(-)
This commit is contained in:
@@ -380,7 +380,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t
|
||||
return;
|
||||
case R_ARM_ABS32:
|
||||
case R_ARM_TARGET1:
|
||||
if (s1->output_type == TCC_OUTPUT_DLL) {
|
||||
if (s1->output_type & TCC_OUTPUT_DYN) {
|
||||
esym_index = get_sym_attr(s1, sym_index, 0)->dyn_index;
|
||||
qrel->r_offset = rel->r_offset;
|
||||
if (esym_index) {
|
||||
|
||||
Reference in New Issue
Block a user