On Fri, Jul 14, 2017 at 11:08 PM, Thomas Petazzoni
<[email protected]> wrote:
> Building Busybox on SPARC or SPARC64 with CONFIG_BUILD_LIBBUSYBOX=y
> currently fails with:
>
> miscutils/lib.a(i2c_tools.o): In function `i2c_dev_open':
> i2c_tools.c:(.text.i2c_dev_open+0x14): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC0'
> i2c_tools.c:(.text.i2c_dev_open+0x38): relocation truncated to fit: 
> R_SPARC_GOT13 against symbol `bb_errno' defined in COMMON section in 
> libbb/lib.a(ptr_to_globals.o)
> i2c_tools.c:(.text.i2c_dev_open+0x6c): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC1'
> miscutils/lib.a(i2c_tools.o): In function `check_funcs_test_end':
> i2c_tools.c:(.text.check_funcs_test_end+0x24): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC2'
> i2c_tools.c:(.text.check_funcs_test_end+0x2c): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC3'
> miscutils/lib.a(i2c_tools.o): In function `check_read_funcs':
> i2c_tools.c:(.text.check_read_funcs+0x30): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC10'
> i2c_tools.c:(.text.check_read_funcs+0x80): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC4'
> i2c_tools.c:(.text.check_read_funcs+0x98): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC5'
> i2c_tools.c:(.text.check_read_funcs+0xc0): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC6'
> i2c_tools.c:(.text.check_read_funcs+0xe0): relocation truncated to fit: 
> R_SPARC_GOT13 against `.LC7'
> i2c_tools.c:(.text.check_read_funcs+0xf8): additional relocation overflows 
> omitted from the output

Can you investigate this further?
LIBBUSYBOX build results in entire busybox code being put into a library.

nm -D libbusybox.so.1.28.0.git

shows that there are only defined entry points to each applet's main():

0007b159 T bunzip2_main
0007c8db T bzip2_main
000677bb T cal_main
0008e08e T cat_main

(so, at max less than 350 entry points), and references to libc functions:

         U asprintf
         U atof
         U atoi

No internal libbb functions or variables are exposed.

I don't understand the error messages you are seeing. bb_errno should
have hidden visibility,
meaning that it is an internal (to libbusybox.so) label, and all
references to it
should be resolved without any shared linker magic. .LCn labels are
similar, they are
referring to text strings (messages and such).

What is going on? Why your linker has relocations between individual
.o files which go
to the same library?
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to