NetBSD/aarch64 Unknown relocation type for got: 299

Previous Topic Next Topic
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

NetBSD/aarch64 Unknown relocation type for got: 299

Christian Jullien-3

Yet another reloc error with clang, on NetBSD aarch64 this time


uname -a

NetBSD arm64 9.1 NetBSD 9.1 (GENERIC64) #0: Sun Oct 18 19:24:30 UTC 2020  [hidden email]:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm


./configure --strip-binaries --cc=clang --prefix=/home/jullien/tinycc/static

Binary directory    /home/jullien/tinycc/static/bin

TinyCC directory    /home/jullien/tinycc/static/lib/tcc

Library directory   /home/jullien/tinycc/static/lib

Include directory   /home/jullien/tinycc/static/include

Manual directory    /home/jullien/tinycc/static/share/man

Info directory      /home/jullien/tinycc/static/share/info

Doc directory       /home/jullien/tinycc/static/share/doc

Source path         /home/jullien/tinycc

C compiler          clang (7.0)

Target OS           Linux

CPU                 aarch64

Triplet             aarch64-linux-gnu

Config              strip

Creating config.mak and config.h

clang -o tcc.o -c tcc.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TARGET_AR                                                                                            M64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-al                                                                                            iasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-                                                                                            result -Wno-string-plus-int -I.

clang -o libtcc.o -c libtcc.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TAR                                                                                            GET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-str                                                                                            ict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-u                                                                                            nused-result -Wno-string-plus-int -I.

clang -DC2STR conftest.c -o c2str.exe && ./c2str.exe include/tccdefs.h tccdefs_.                                                                                            h

clang -o tccpp.o -c tccpp.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TARGE                                                                                            T_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-stric                                                                                            t-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unu                                                                                            sed-result -Wno-string-plus-int -I.

clang -o tccgen.o -c tccgen.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TAR                                                                                            GET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-str                                                                                            ict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-u                                                                                            nused-result -Wno-string-plus-int -I.

clang -o tccelf.o -c tccelf.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TAR                                                                                            GET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-str                                                                                            ict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-u                                                                                            nused-result -Wno-string-plus-int -I.

clang -o tccasm.o -c tccasm.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TAR                                                                                            GET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-str                                                                                            ict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-u                                                                                            nused-result -Wno-string-plus-int -I.

clang -o tccrun.o -c tccrun.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DTCC_TAR                                                                                            GET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-str                                                                                            ict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-u                                                                                            nused-result -Wno-string-plus-int -I.

clang -o arm64-gen.o -c arm64-gen.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DT                                                                                            CC_TARGET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -f                                                                                            no-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare                                                                                             -Wno-unused-result -Wno-string-plus-int -I.

clang -o arm64-link.o -c arm64-link.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -                                                                                            DTCC_TARGET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement                                                                                             -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compar                                                                                            e -Wno-unused-result -Wno-string-plus-int -I.

clang -o arm64-asm.o -c arm64-asm.c -DCONFIG_TRIPLET="\"aarch64-linux-gnu\"" -DT                                                                                            CC_TARGET_ARM64        -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -f                                                                                            no-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare                                                                                             -Wno-unused-result -Wno-string-plus-int -I.

ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o arm64-gen.o                                                                                             arm64-link.o arm64-asm.o

clang -o tcc tcc.o libtcc.a -lm -lpthread -ldl  -s

make[1]: Entering directory '/home/jullien/tinycc/lib'

../tcc -c lib-arm64.c -o lib-arm64.o -B.. -I..

../tcc -c fetch_and_add_arm64.S -o fetch_and_add_arm64.o -B.. -I..

../tcc -c dsohandle.c -o dsohandle.o -B.. -I..

../tcc -ar rcs ../libtcc1.a lib-arm64.o fetch_and_add_arm64.o dsohandle.o

../tcc -c bt-exe.c -o ../bt-exe.o -B.. -I..

../tcc -c bt-log.c -o ../bt-log.o -B.. -I..

../tcc -c bcheck.c -o ../bcheck.o -B.. -I.. -g

make[1]: Leaving directory '/home/jullien/tinycc/lib'

perl ./ tcc-doc.texi tcc-doc.pod

pod2man --section=1 --center="Tiny C Compiler" --release="0.9.27" tcc-doc.pod >t                                                                                            cc.1 && rm -f tcc-doc.pod

make[1]: Entering directory '/home/jullien/tinycc/tests'

------------ hello-exe ------------

Hello World

------------ hello-run ------------

Hello World

------------ libtest ------------

Hello World!

fib(32) = 2178309

add(32, 64) = 96

------------ libtest_mt ------------

running fib with mixed calls

  1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946

(57 ms)

running fib in threads

  1 3 2 5 8 13 21 34 144 89 233 377 1597 55 610 2584 4181 987 6765 10946

(60 ms)

running tcc.c in threads to run fib

  1 2 5 3 13 21 34 55 89 144 8 233 377 610 987 1597 10946 6765 2584 4181

(5538 ms)

compiling tcc.c 10 times

(2541 ms)

------------ test3 ------------

Auto Test3 OK

------------ memtest ------------


------------ dlltest ------------

Hello World

------------ dlltest with PIC ------------

tcc: error: Unknown relocation type for got: 299

make[2]: *** [Makefile:166: dlltest] Error 1

------------ abitest-cc ------------

Tinycc-devel mailing list
[hidden email]
Reply | Threaded
Open this post in threaded view

Re: NetBSD/aarch64 Unknown relocation type for got: 299

tinycc-devel mailing list

Can you help me to recover the commits and give advice to Danny
to use git correctly.



On 1/5/21 2:40 PM, Danny Milosavljevic wrote:

> Hi,
> On Tue, 5 Jan 2021 07:25:33 +0100
> Herman ten Brugge <[hidden email]> wrote:
>> I fixed this one also. But the problem is that below commits are gone.
>> This happended after te commit 'arm-asm: Implement branch to label
>> <>'
> The git workflow I'm using for this project is unusual for me--I'm not sure
> I do the steps the right way.
> I always work on the same local branch, "arm-asm".
> To push changes, I do:
> git checkout mob
> git pull --rebase
> git checkout arm-asm
> git rebase mob
> git push -f ssh://[hidden email]/srv/git/tinycc.git arm-asm:mob
> The last form I've never used ever before anywhere else--and I use git every day.
> But that's what the description in tinycc said.
> Anyway, could be that the stuff above broke something, or not.  Just wanted to
> make sure we can figure out what happened.
> Should I instead create a new branch every time?
> (Can I set the upstream link ("-u") so I don't have to do the last line with URL?
> How would that look?)

Tinycc-devel mailing list
[hidden email]