History log of /tinycc/arm64-link.c (Results 1 - 21 of 21)
Revision Date Author Comments
# 72729d8e 10-Dec-2019 grischka <grischka>

allow libtcc states to be used concurrently

This allows creation of TCCStates and operation with API
calls independently from each other, even from threads.

Frontend (option par

allow libtcc states to be used concurrently

This allows creation of TCCStates and operation with API
calls independently from each other, even from threads.

Frontend (option parsing/libtcc.c) and backend (linker/tccelf.c)
now depend only on the TCCState (s1) argument.

Compilation per se (tccpp.c, tccgen.c) is still using
globals for convenience. There is only one entry point
to this section which is tcc_compile() which is protected
by a semaphore.

There are some hacks involved to avoid too many changes,
as well as some changes in order to avoid too many hacks ;)

The test libtcc_test_mt.c shows the feature. Except this
new file the patch adds 87 lines overall.

show more ...


# df349ddc 09-Dec-2019 grischka <grischka>

versym cleanup

get rid of some globals, in the first place. Also, for the
PE target, ifdef out ELF executable creation.


# 7d4a71fc 03-Sep-2019 Siddhesh Poyarekar <siddhesh@gotplt.org>

arm64: Increase page size

Fedora, RHEL and Centos have a default page size of 64K for arm64, so
bump up the page size so that ELF sections of the generated inary are
correctly aligne

arm64: Increase page size

Fedora, RHEL and Centos have a default page size of 64K for arm64, so
bump up the page size so that ELF sections of the generated inary are
correctly aligned for 64K pages too.

show more ...


# 1353ccd9 22-Jun-2019 Michael Matz <matz@suse.de>

riscv: Handle some usual relocs

this is enough to let me link a tcctest.c compiled by GCC
using some current debian sid riscv64 system. It needs
linking against libgcc.a for various

riscv: Handle some usual relocs

this is enough to let me link a tcctest.c compiled by GCC
using some current debian sid riscv64 system. It needs
linking against libgcc.a for various floating point TFmode
routines. The result runs.

show more ...


# adbe794a 12-Jan-2019 Michael Matz <matz@suse.de>

Properly access sym_attrs

in corner cases the direct access to the sym_attrs[] array in the
backends is out of bounds and replacec garbage symindices into
the relocs.


# d348a9a5 12-Dec-2017 grischka <grischka>

final update for 0.9.27

tccgen.c:
- fix ldouble asm hack
- fix a VLA problem on Win64 (also x86_64-gen.c)
- patch_type(): make sure that no symbol ever changes
from global

final update for 0.9.27

tccgen.c:
- fix ldouble asm hack
- fix a VLA problem on Win64 (also x86_64-gen.c)
- patch_type(): make sure that no symbol ever changes
from global to static

tcc.c:
- tcc -vv: print libtcc1.a path also on win32

tccpe.c, tcctools.c:
- use unix LF mode to for .def output files (that is for
creating reproducible output trees)

Makefile:
- suppress some warnings when makeinfo is missing
- call 'which install' only on win32

tests/Makefile:
- change PATH only on WINNT systems (i.e. not if cross-compiling
on linux for win32)
- asm-c-connect.test: slim output and do diff

tccrun.c tccpe.c *-link.c:
- integrate former 'pe_relocate_rva()' into normal relocation
This also fixes linkage of the unwind data on WIN64 for -run
(reported by Janus Lynggaard Thorborg)

tccasm.c, tests/tcctest.c:
- fix dot (sym_index of -1 crashed in put_elf_reloc)
- massage .set a bit (see test)

other:
- #define SECTION_ABS removed
- ST_DATA Section *strtab_section: removed
- put_extern_sym2(): take int section number

Conflicts:
tccelf.c
tccpe.c

Conflicts:
tccelf.c

show more ...


# 19d8b8a1 07-May-2017 Larry Doolittle <ldoolitt@recycle.lbl.gov>

Spelling fixes in C comments only


# 680e84fe 06-May-2017 Michael Matz <matz@suse.de>

elf: Support STB_LOCAL dynamic symbols

local symbols can be resolved statically, they don't have to be
done dynamically, so this is a slight speedup at load time for
produced executa

elf: Support STB_LOCAL dynamic symbols

local symbols can be resolved statically, they don't have to be
done dynamically, so this is a slight speedup at load time for
produced executables and shared libs. The musl libc also rejects
any STB_LOCAL symbols for dynamic symbol resolution, so there it
also fixes use of shared libs created by tcc.

show more ...


# 63b2f907 28-Mar-2017 Andrei Warkentin <andrey.warkentin@gmail.com>

tcc: fixup clang warnings

The O(xxx) stuff in i386-asm.c had me scratching my head. Extracting
the macro and trying it out in a separate program doesn't give
me any warnings, so I'm

tcc: fixup clang warnings

The O(xxx) stuff in i386-asm.c had me scratching my head. Extracting
the macro and trying it out in a separate program doesn't give
me any warnings, so I'm confused about what could be going on there.
Any cast will make things happy. I used a uint64_t to catch actual
cases of overflow, which will still cause a -Wconstant-conversion
warning.

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>

show more ...


# 983520d7 11-Feb-2017 Michael Matz <matz@suse.de>

arm64: Fix 42_function_test

Like in 77d7ea04a some relocs need to be handled as possibly
needing a PLT/GOT slot in TCC until TCC can transfer dynamic relocs
to executables.


# 3980e07f 13-Dec-2016 Michael Matz <matz@suse.de>

arm64: Handle R_AARCH64_PREL32 again

This got lost when splitting reloc handling to individual files.


# ca92bfc3 15-Dec-2016 grischka <grischka>

tccelf: some linker cleanup

- generate and use SYM@PLT for plt addresses
- get rid of patch_dynsym_undef hack (no idea what it did on FreeBSD)
- use sym_attrs instead of symtab_to_dy

tccelf: some linker cleanup

- generate and use SYM@PLT for plt addresses
- get rid of patch_dynsym_undef hack (no idea what it did on FreeBSD)
- use sym_attrs instead of symtab_to_dynsym
- special case for function pointers into .so on i386
- libtcc_test: test tcc_add_symbol with data object
- move target specicic code to *-link.c files
- add R_XXX_RELATIVE (needed for PE)

show more ...


# fe6453f8 10-Dec-2016 Thomas Preud'homme <robotux@celest.fr>

Use functions to get relocation info

MSVC does not support array designator so cannot compile source using
relocs_info. This commit replace the relocs_info array into a set of
functi

Use functions to get relocation info

MSVC does not support array designator so cannot compile source using
relocs_info. This commit replace the relocs_info array into a set of
functions, each returning the value given by a given field of the struct
reloc_info.

show more ...


# d31226c8 10-Dec-2016 Thomas Preud'homme <robotux@celest.fr>

Remove now useless pltoff_addend reloc info

Last use for pltoff_addend field of relocs_info array was removed in
commit 25927df3b75c5ce2b64ab8acdcc5974b4e1c89c1. It is now useless so

Remove now useless pltoff_addend reloc info

Last use for pltoff_addend field of relocs_info array was removed in
commit 25927df3b75c5ce2b64ab8acdcc5974b4e1c89c1. It is now useless so
this commit removes it and all initialization related to it.

show more ...


# 0bf26286 10-Dec-2016 Thomas Preud'homme <robotux@celest.fr>

Fix PLT creation for i386

i386 target does not have PC relative loads. Its ABI therefore require
ebx register to points to the GOT when executing a PLT entry. This means
that PLT ent

Fix PLT creation for i386

i386 target does not have PC relative loads. Its ABI therefore require
ebx register to points to the GOT when executing a PLT entry. This means
that PLT entry cannot be used transparently, the compiler needs to
expect execution of a PLT entry to be able to use one, that is a PLT
entry should only be created if the relocation explicitely asks for it
(eg. R_386_PLT32).

This patch creates a new target macro PCRELATIVE_DLLPLT to indicate
whether a target can do a PC relative load in PLT entry when building a
dynamic library. Executable do not normally pose a problem because they
are loaded at a fixed address and thus the absolute address of GOT can
be used.

Note that in such a case, if the compiler does not use a PLT aware
relocation for external access then the code relocation will fall on the
dynamic loader since there is no PLT entry to relocate too.

show more ...


# 2372639e 05-Dec-2016 Thomas Preud'homme <robotux@celest.fr>

Fix set but not used error in arm64-link.c


# 38117940 05-Dec-2016 Thomas Preud'homme <robotux@celest.fr>

Fix tcc_error params for R_AARCH64_(JUMP|CALL)26


# 59391d55 05-Dec-2016 Thomas Preud'homme <robotux@celest.fr>

Fix relocs_info declaration in tcc.h

C standard specifies that array should be declared with a non null size
or with * for standard array. Declaration of relocs_info in tcc.h was
not

Fix relocs_info declaration in tcc.h

C standard specifies that array should be declared with a non null size
or with * for standard array. Declaration of relocs_info in tcc.h was
not respecting this rule. This commit add a R_NUM macro that maps to the
R_<ARCH>_NUM macros and declare relocs_info using it. This commit also
moves all linker-related macros from <arch>-gen.c files to <arch>-link.c
ones.

show more ...


# 25927df3 12-Nov-2016 Thomas Preud'homme <robotux@celest.fr>

Consolidate all relocations in relocate_section

Static relocation of functions in dynamic libraries must use the PLT
entry as the target. Before this commit, it used to be done in 2 part

Consolidate all relocations in relocate_section

Static relocation of functions in dynamic libraries must use the PLT
entry as the target. Before this commit, it used to be done in 2 parts
for ARM, with the offset of the PLT entry from the beginning of the PLT
being put in the relocated place in build_got_entries () and then the
address of the PLT being added in relocate_section.

This led to code dealing with reading the offset of a bl instruction in
build_got_entries. Furthermore, the addition of the address of the start
of the PLT was done based on the relocation type which does not convey
whether a PLT entry should be used to reach the symbol.

This commit moves the decision to use the PLT as the target in
relocate_section, therefore having the instruction aware code contained
to the target-specific bit of that function (in <target>-link.c).

Note that relocate_syms is *not* the right place to do this because two
different relocations for the same symbol can make different decision.
This is the case in tcc -run mode where the static and dynamic
relocation are done by tcc.

Storing the PLT entry address in the symbol's st_value field and relying
on the specific relocation type being used for dynamic relocation would
work but the PLT entry address would then appear in the static symbol
table (symtab). This would also make the static symbol table entry
differ from the dynamic symbol table entry.

show more ...


# 1c811a4d 12-Nov-2016 Thomas Preud'homme <robotux@celest.fr>

Make build_got_entries more target independent

Factor most of common logic between targets in build_got_entries by
defining target specific info into structures in the backends.


# cb273fda 12-Nov-2016 Thomas Preud'homme <robotux@celest.fr>

Do section relocation in architecture backend