Commit Graph

2985 Commits

Author SHA1 Message Date
Christian Jullien
debe8d013d Use $targetos instead of a second call to uname 2021-01-17 11:45:23 +01:00
Christian Jullien
a2987fef19 configure automatically detects correct arm configuration on NetBSD 2021-01-17 09:02:00 +00:00
Christian Jullien
53f7d8baf4 conftest correctly detects NetBSD and OpenBSD for TRIPLET_OS 2021-01-17 08:49:37 +01:00
Christian Jullien
f5f8326531 FreeBSD: arm port is fully supported and added to cross list 2021-01-16 16:25:22 +01:00
herman ten brugge
5aba20f270 BSD: arm support
Support OpenBSD/FreeBSD/NetBSD on asm.

move PAGESIZE to tcc.h and use _SC_PAGESIZE (netbsd/arm has 8192 pagesize)

arm:
- fix cmp instruction for qemu (raspberry pi works without patch?)
- increase start address/size
- use large plt size
- add return R_ARM_PREL31
- add R_ARM_TARGET1 to prepare_dynamic_rel
- add gcc_s to FreeBSD (unwind code)
- do not use __clear_cache on bsd (sometimes bad system call)
- do stack unwinding on bsd
- test/tcctest.c: use %lld %llu on bsd
2021-01-16 07:01:59 +01:00
Danny Milosavljevic
757eccd1d2
arm-asm: Raise error if user tries to use PC for offset register of single data transfer 2021-01-14 23:16:38 +01:00
Danny Milosavljevic
007839597f
arm-asm: Implement ldr and str with shifted register offset
Factor out asm_parse_optional_shift
2021-01-14 23:16:31 +01:00
Christian Jullien
1d7b233562 Remove strip logic form configure script, keep a deprecated warning message when --strip-binaries is still used. 2021-01-14 07:10:41 +01:00
herman ten brugge
13f6e8a866 OpenBSD: arm support typo (WIP) 2021-01-13 19:58:19 +01:00
herman ten brugge
96e3923239 OpenBSD: arm support update (WIP) 2021-01-13 19:41:04 +01:00
Christian Jullien
20dbfe99b8 --strip-binaries is deprecates, build never strips, use 'make install-strip' to install stripped binaries 2021-01-13 18:51:23 +01:00
herman ten brugge
23989cbcf3 OpenBSD: arm support (WIP) 2021-01-13 13:20:36 +01:00
Christian Jullien
d5c78ce655 Add more supported systems for cross test 2021-01-13 09:34:37 +01:00
Christian Jullien
c35f61b958 Fix ./configure strip test 2021-01-13 07:56:05 +01:00
Christian Jullien
d7d470b357 ./configure always stripped binaries even if --strip-binaries was unset 2021-01-13 07:27:46 +01:00
herman ten brugge
56f74f2eeb Add shstrtab name in tccelf.c
Last commit removed shstrtab which make gdb/readelf unhappy.
2021-01-12 21:41:41 +01:00
grischka
62c0c4c77a tccelf.c: factor out elf_output_obj()
The small common parts within elf_output_file() aren't
worth the many #ifdefs.  Also, set section sizes and
allocate section names in 2 separate functions.
2021-01-12 18:39:35 +01:00
herman ten brugge
c74c6ed61a Serveral updates
arm-gen.c:
- remove fr parameter from load_value

tccelf.c:
- update comment and remove check for sh_size

tests/boundtest.c:
- fix testcase 16/17
2021-01-12 18:06:23 +01:00
herman ten brugge
28646b559d fix cross compiling on openbsd 2021-01-12 09:59:52 +01:00
herman ten brugge
ecdee4a697 arm64: Fix loading from constant address 2021-01-12 08:46:05 +01:00
Christian Jullien
00d467d44c OpenBSD: use portable strtoll instead of strtonum to allow cross-compilation test 2021-01-12 08:12:40 +01:00
herman ten brugge
4d254312be Remove gaps between RELX sections update
Update file_offset as well
2021-01-12 07:40:45 +01:00
Christian Jullien
64d5db7635 *BSD: fix broken Makefile on all BSD systems. 2021-01-12 07:08:39 +01:00
herman ten brugge
c9bdfcedb4 Remove gaps between RELX sections
These gaps are a result of final_sections_reloc. Here some relocs are removed.
The gaps are then filled with 0 in tcc_output_elf. The 0 is intepreted as
R_...NONE reloc. This does work on most targets but on OpenBSD/arm64 this
is illegal.
2021-01-12 06:59:51 +01:00
herman ten brugge
cd91ea658a OpenBSD: x86 update 2021-01-11 19:26:10 +01:00
grischka
bbc7070c82 make test: run cross-test always
To see inconsistencies when they happen.
2021-01-11 15:17:26 +01:00
Christian Jullien
42220676d7 OpenBSD: x86 use few clang compatible C types 2021-01-11 12:19:09 +01:00
Christian Jullien
db6dd66047 OpenBSD: -arm- Add more R_ARM* constants in elf.h. 2021-01-11 07:21:57 +01:00
Christian Jullien
6f27eca785 OpenBSD: Add 2 new R_ARM constants to be handled by arm-link.c 2021-01-10 19:02:55 +01:00
Christian Jullien
1018ee8749 OpenBSD: aarch64 99% working, armv7 WIP. 2021-01-10 11:56:14 +01:00
Christian Jullien
ef7c4388e7 OpenBSD: elfinterp location looks the same for all architectures. i386 WIP 2021-01-10 07:23:03 +01:00
Christian Jullien
0e74965d7f make install always strips, only install-strip target should do 2021-01-10 05:57:52 +01:00
herman ten brugge
68744e3260 OpenBSD: Add static link support 2021-01-09 20:35:54 +01:00
Christian Jullien
a3524bd780 OpenBSD: Fix warning and other *BSD builds. 2021-01-09 17:36:13 +01:00
Christian Jullien
e6d15a5df1 OpenBSD: add a workaround to find the versioned shared lib as no .so symlink exist. 2021-01-09 15:38:26 +01:00
Christian Jullien
5f9d4ad144 OpenBSD: crtbeginT.o does not exist on thsi system as with other *BSD systems. 2021-01-09 14:14:05 +01:00
Danny Milosavljevic
aed4941e6b
arm-asm: Add ldrh, ldrsh, ldrsb, strh 2021-01-08 13:52:25 +01:00
herman ten brugge
f44332c891 update arm text relocations
Avoid absolute text relocations and use relative/got addressing.
This makes code work on netbsd where this is required. (No DT_TEXTREL)
2021-01-06 09:48:15 +01:00
Christian Jullien
cb788d72c7 NetBSD: Minor edit, keep tab style of previous line 2021-01-06 07:10:56 +01:00
Christian Jullien
760024bde9 NetBSD: Trying to fix reloc error 38 on arm - WIP 2021-01-06 07:02:19 +01:00
Danny Milosavljevic
f9c3b61884
arm-asm-testsuite.sh: Prefer current tcc as specified in $(TCC) 2021-01-06 02:18:14 +01:00
Danny Milosavljevic
f3912fafdd
arm-asm-testsuite.sh: Prefer cross-binutils' objdump 2021-01-06 02:14:49 +01:00
grischka
aeb8f427e2 tccgen: introduce TOK_NEG for unary minus
for floats (currently only).  On x86_64 uses built-in fp
constants (in libtcc1.c) to avoid multiple anonymous
instances.

Also: win32/i386: use __alloca for big struct stack store
- use new function int tok_alloc_const(const char*);
- change alloca86.S to preserve EDX

tccelf.c: fix a warning with 'roinf_use'
2021-01-06 01:44:22 +01:00
herman ten brugge
a5865fab22 text relocation for arm 2021-01-05 19:46:43 +01:00
herman ten brugge
81fec84012 disable nan test for clang 2021-01-05 19:44:06 +01:00
Danny Milosavljevic
77a6a9166d tests: Make arm-asm-testsuite.sh print the failed test cases. 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
0c399306b8 tests: Call arm-asm-testsuite.sh on "asmtest" target. 2021-01-05 17:46:08 +00:00
CodeHz
425bd2a3db fix "invalid token at start of a preprocessor expression" 2021-01-05 17:46:08 +00:00
Christian Jullien
3873f95197 NetBSD: start arm support. WIP 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
0754912ebd arm-asm: Add testsuite 2021-01-05 17:46:08 +00:00