Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAA7aPHg3XKDKPcw_ReHGvyqfX2RibORy6=rtSE3oSWisWqhjbw@mail.gmail.com>
Date: Fri, 3 Oct 2014 15:20:37 -0400
From: stephen Turner <stephen.n.turner@...il.com>
To: musl@...ts.openwall.com
Subject: GCC-MUSL dynamic linking

Previously it was found that i was compiling gcc without certain helpful
flags IE --host=i686-linux-musl.  I repatched GCC several times each time
referencing the documentation found to ensure i'm not having issues there.
also I ensured i had clean fresh code.  I haven't been able to use --host
as i receive a error when compiling libiberty but i have been able to use
--target and compile gcc statically to ensure operation when run on the
target as host.  I performed the strace like previously requested that
showed my linking errors and i'm hoping it helps show the issue now.  I
still cannot compile dynamic code (but i can run it when /lib/libc.so
./a.out is specified)

Im using the following packages
bash 4.3
binutils 2.24
gcc 4.6.4
gcc patch 4.6.4 - musl
gmp 6.0.0a
linux 3.2.63
m4 latest
make 4.0
mpc 1.0.2
mpfr 3.1.2
musl 1.1.3

one other odd thing, for what ever reason the crt* libs were in
/lib/gcc/i486-linux-musl/4.7/ which i moved over to the 4.6.4. my host
debian system has the 4.7 gcc system so i can only assume that was somehow
my fault.

Thanks again for your help.



execve("/root/targetfs/bin/gcc", ["/root/targetfs/bin/gcc",
"/root/targetfs/gcc-build/test.c"], [/* 13 vars */]) = 0
uname({sys="Linux", node="debian", ...}) = 0
brk(0)                                  = 0x917b000
brk(0x917bcd0)                          = 0x917bcd0
set_thread_area({entry_number:-1 -> 6, base_addr:0x917b830, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
brk(0x919ccd0)                          = 0x919ccd0
brk(0x919d000)                          = 0x919d000
rt_sigaction(SIGINT, {SIG_IGN, [INT], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x8051cd3, [INT], SA_RESTART}, {SIG_IGN, [INT],
SA_RESTART}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN, [HUP], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0x8051cd3, [HUP], SA_RESTART}, {SIG_IGN, [HUP],
SA_RESTART}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN, [TERM], SA_RESTART}, {SIG_DFL, [], 0}, 8) =
0
rt_sigaction(SIGTERM, {0x8051cd3, [TERM], SA_RESTART}, {SIG_IGN, [TERM],
SA_RESTART}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTART}, {SIG_DFL, [], 0}, 8) =
0
rt_sigaction(SIGPIPE, {0x8051cd3, [PIPE], SA_RESTART}, {SIG_IGN, [PIPE],
SA_RESTART}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0}, 8) =
0
lstat64("/root", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/root/targetfs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/targetfs/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/targetfs/bin/gcc", {st_mode=S_IFREG|0755, st_size=944563,
...}) = 0
lstat64("/root", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/root/targetfs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/targetfs/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/targetfs/bin/gcc", {st_mode=S_IFREG|0755, st_size=944563,
...}) = 0
access("/root/targetfs/gcc-build/test.c", F_OK) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/", X_OK) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/", X_OK) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/specs", R_OK) = -1
ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i486-linux-musl/4.6.4/specs",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/specs",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/specs", R_OK) = -1 ENOENT
(No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/", X_OK) = 0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/lto-wrapper",
{st_mode=S_IFREG|0755, st_size=635475, ...}) = 0
access("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/lto-wrapper",
X_OK) = 0
access("/tmp", R_OK|W_OK|X_OK)          = 0
gettimeofday({1412360584, 447487}, NULL) = 0
getpid()                                = 4977
open("/tmp/ccpvLmME.s", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/cc1",
{st_mode=S_IFREG|0755, st_size=13731931, ...}) = 0
access("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/cc1", X_OK) = 0
vfork()                                 = 4978
waitpid(4978, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 4978
--- SIGCHLD (Child exited) @ 0 (0) ---
gettimeofday({1412360584, 463026}, NULL) = 0
open("/tmp/ccIAxVQc.o", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 3
close(3)                                = 0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/as", 0xbf9913c0) =
-1 ENOENT (No such file or directory)
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/as", 0xbf9913c0) =
-1 ENOENT (No such file or directory)
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/as", 0xbf9913c0) = -1
ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/as", 0xbf9913c0) = -1
ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/as", 0xbf9913c0) = -1 ENOENT
(No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/bin/i486-linux-musl/4.6.4/as",
0xbf9913c0) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/bin/i386-linux-gnu/as",
0xbf9913c0) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/bin/as",
0xbf9913c0) = -1 ENOENT (No such file or directory)
vfork()                                 = 4979
waitpid(4979, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 4979
--- SIGCHLD (Child exited) @ 0 (0) ---
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/collect2",
{st_mode=S_IFREG|0755, st_size=755017, ...}) = 0
access("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/collect2", X_OK) =
0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/root/targetfs/lib/gcc/i486-linux-musl/.", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/bin/i486-linux-musl/4.6.4/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/bin/i386-linux-gnu/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/bin/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i486-linux-musl/4.6.4/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i386-linux-gnu/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i486-linux-musl/4.6.4/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i386-linux-gnu/.",
0xbf991494) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/lib/i486-linux-musl/4.6.4/.", 0xbf991494) = -1 ENOENT (No such
file or directory)
stat64("/lib/i386-linux-gnu/.", {st_mode=S_IFDIR|0755, st_size=12288, ...})
= 0
stat64("/lib/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/lib/i486-linux-musl/4.6.4/.", 0xbf991494) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/i386-linux-gnu/.", {st_mode=S_IFDIR|0755, st_size=12288,
...}) = 0
stat64("/usr/lib/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/crt1.o", R_OK) = -1
ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i486-linux-musl/4.6.4/crt1.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i386-linux-gnu/crt1.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/crt1.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i486-linux-musl/4.6.4/crt1.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i386-linux-gnu/crt1.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../crt1.o",
R_OK) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/crti.o", R_OK) = -1
ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i486-linux-musl/4.6.4/crti.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i386-linux-gnu/crti.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/crti.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i486-linux-musl/4.6.4/crti.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i386-linux-gnu/crti.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../crti.o",
R_OK) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/crtbegin.o", R_OK) = 0
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i486-linux-musl/4.6.4/.",
0xbf9902e4) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i386-linux-gnu/.",
0xbf9902e4) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/.",
0xbf9902e4) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i486-linux-musl/4.6.4/.",
0xbf9902e4) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i386-linux-gnu/.",
0xbf9902e4) = -1 ENOENT (No such file or directory)
stat64("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../.",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/lib/i486-linux-musl/4.6.4/.", 0xbf9902e4) = -1 ENOENT (No such
file or directory)
stat64("/lib/i386-linux-gnu/.", {st_mode=S_IFDIR|0755, st_size=12288, ...})
= 0
stat64("/usr/lib/i486-linux-musl/4.6.4/.", 0xbf9902e4) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/i386-linux-gnu/.", {st_mode=S_IFDIR|0755, st_size=12288,
...}) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/crtend.o", R_OK) = 0
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/crtn.o", R_OK) = -1
ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i486-linux-musl/4.6.4/crtn.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/i386-linux-gnu/crtn.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../../i486-linux-musl/lib/crtn.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i486-linux-musl/4.6.4/crtn.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../i386-linux-gnu/crtn.o",
R_OK) = -1 ENOENT (No such file or directory)
access("/root/targetfs/lib/gcc/i486-linux-musl/4.6.4/../../../crtn.o",
R_OK) = 0
stat64("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/collect2",
{st_mode=S_IFREG|0755, st_size=755017, ...}) = 0
access("/root/targetfs/libexec/gcc/i486-linux-musl/4.6.4/collect2", X_OK) =
0
vfork()                                 = 4980
waitpid(4980, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 4980
--- SIGCHLD (Child exited) @ 0 (0) ---
stat64("/tmp/ccIAxVQc.o", {st_mode=S_IFREG|0600, st_size=992, ...}) = 0
unlink("/tmp/ccIAxVQc.o")               = 0
stat64("/tmp/ccpvLmME.s", {st_mode=S_IFREG|0600, st_size=443, ...}) = 0
unlink("/tmp/ccpvLmME.s")               = 0
exit_group(0)                           = ?

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.