Busybox compilation error
Tiago Maluta
maluta_tiago at yahoo.com.br
Sat Apr 12 21:40:17 UTC 2008
Denys Vlasenko wrote:
> Which version of busybox?
I'm using 1.10.0.
Now, for testing I:
1. make defconfig (just changing: ash -> hush) because I got:
shell/ash.c:66:2: error: #error "Do not even bother, ash will not run on
uClinux
2. Edit ARCH and CROSS_COMPILER in Makefile
> Wow, your "strip" doesn't recognize the binary! :)
>
> Well, you can just "cp busybox_unstripped busybox" and use
> unstripped binary.
After the same error, it results, in two files:
* busybox_unstripped
* busybox_unstripped.gdb
# file busybox_unstripped
busybox_unstripped: BFLT executable - version 4 ram
# file busybox_unstripped.gdb
busybox_unstripped.gdb: ELF 32-bit LSB executable, ARM, version 1
(SYSV), statically linked, not stripped
>
> What these command say? (Example is from my x86 machine):
With readelf I could extract information only from busybox_unstripped.gdb
# readelf -h busybox_unstripped.gdb
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x4
Start of program headers: 52 (bytes into file)
Start of section headers: 888432 (bytes into file)
Flags: 0x5000002, has entry point,
Version5 EABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 4
Size of section headers: 40 (bytes)
Number of section headers: 16
Section header string table index: 13
But, I think, with QEMU (qemu-arm) I could run:
# qemu-arm busybox_unstripped
BusyBox v1.10.0 (2008-04-12 17:35:40 BRT) multi-call binary
Copyright (C) 1998-2007 Erik Andersen, Rob Landley, Denys Vlasenko
# qemu-arm busybox_unstripped.gdb
qemu: uncaught target signal 11 (Segmentation fault) - exiting
Observation: With CodeSourcery toolchain (arm-none-linux-gnueabi-) that
links against glibc the busybox compilation (defconfig) works fine.
I'd like to know more about stripped binaries, these are only for
getting metadata from compiled files? Why it didn't work on a toolchain
with uclibc ?
It's correct these outputs?
Thanks,
Tiago Maluta
More information about the busybox
mailing list