[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] X86_64 shared library relocation errors?
From: |
Simon Sobisch |
Subject: |
Re: [Tinycc-devel] X86_64 shared library relocation errors? |
Date: |
Wed, 30 Dec 2020 00:05:07 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
Hi,
it looks like this is still an issue with tcc version 0.9.27 (x86_64
Linux) provided in Debian 10 (buster).
Just rechecked building GnuCOBOL 3.1.2 [1] with
./configure CC=tcc LD=tcc AS=tcc CFLAGS="-g" --without-db
But at the end of make (in the part where the generated program cobc is
run to generate other stuff) I get
cobc: Symbol `stat' causes overflow in R_X86_64_PC32 relocation
cobc: Symbol `stat' causes overflow in R_X86_64_PC32 relocation
cobc: Symbol `stat' causes overflow in R_X86_64_PC32 relocation
cobc: Symbol `stat' causes overflow in R_X86_64_PC32 relocation
cobc: Symbol `stat' causes overflow in R_X86_64_PC32 relocation
attempt to reference unallocated memory (signal SIGSEGV)
Note: when compiling with CFLAGS="-g -b" tcc failed to compile
const char* fname = f->flag_filler ? "FILLER":f->name;
with
error: unhandled size when dereferencing bounded pointer
which can be work around with
const char* fname = f->flag_filler ? (const char *)"FILLER":f->name;
but after fixing that I get pages full of
cobc: Symbol `__bound_local_new' causes overflow in R_X86_64_PC32 relocation
cobc: Symbol `__bound_local_delete' causes overflow in R_X86_64_PC32
relocation
cobc: Symbol `__bound_ptr_indir8' causes overflow in R_X86_64_PC32
relocation
cobc: Symbol `__bound_ptr_indir4' causes overflow in R_X86_64_PC32
relocation
cobc: Symbol `__bound_ptr_indir1' causes overflow in R_X86_64_PC32
relocation
cobc: Symbol `__bound_ptr_indir2' causes overflow in R_X86_64_PC32
relocation
...
Segmentation fault
Is x86_64 still a known issue?
Or maybe this is only an issue in the Debian package (apt info tcc
shows: 0.9.27-8 amd64, so its currently at patchlevel 8)?
Is there a workaround or some patch Debian might include?
Is there a newer tagged version one can build locally and test?
Thank you for responses,
Simon
[1]: https://ftp.gnu.org/gnu/gnucobol/gnucobol-3.1.2.tar.gz
------------------------------------------
Le mercredi 17 octobre 2012 23:17:23, address@hidden a écrit :
> Hi. Occasionally I use tcc on x86_64 for testing building gawk with
> something that isn't GCC. I'm getting this:
>
> ../gawk: Symbol `malloc' causes overflow in R_X86_64_PC32 relocation
> ../gawk: Symbol `free' causes overflow in R_X86_64_PC32 relocation
> ../gawk: Symbol `malloc' causes overflow in R_X86_64_PC32 relocation
> ../gawk: Symbol `free' causes overflow in R_X86_64_PC32 relocation
> ../gawk: Symbol `malloc' causes overflow in R_X86_64_PC32 relocation
> ....
>
> I vaguely recall that this was discussed before. This is with the mob
> branch after a recent git pull.
http://lists.nongnu.org/archive/html/tinycc-devel/2012-06/msg00002.html
>
> To reproduce, simply clone the gawk git repo and configure and build
> the master branch with tcc.
>
> Much thanks!
>
> Arnold
That's on my TODO list along with making objdump and gdb recognize files
compiled by tcc as binaries (which they don't when -g flag is not used
to compile) but it might be in a few months…
Regards,
Tom
- Re: [Tinycc-devel] X86_64 shared library relocation errors?,
Simon Sobisch <=