Skip to content

Instantly share code, notes, and snippets.

View tpoechtrager's full-sized avatar

Thomas Pöchtrager tpoechtrager

View GitHub Profile
Program received signal SIGILL, Illegal instruction.
0x002004cc in std::_Rb_tree<ld::Atom const*, std::pair<ld::Atom const* const, ld::File const*>, std::_Select1st<std::pair<ld::Atom const* const, ld::File const*> >, std::less<ld::Atom const*>, std::allocator<std::pair<ld::Atom const* const, ld::File const*> > >::_Rb_tree_impl<std::less<ld::Atom const*>, true>::_Rb_tree_impl (this=0x2b099c <mach_o::relocatable::Atom<arm>::_s_fileOverride>)
at /usr/bin/../lib/gcc/armv7l-unknown-linux-gnueabihf/4.9.2/../../../../include/c++/4.9.2/bits/stl_tree.h:462
462 : _Node_allocator(), _M_key_compare(), _M_header(),
2: x/i $pc
=> 0x2004cc <std::_Rb_tree<ld::Atom const*, std::pair<ld::Atom const* const, ld::File const*>, std::_Select1st<std::pair<ld::Atom const* const, ld::File const*> >, std::less<ld::Atom const*>, std::allocator<std::pair<ld::Atom const* const, ld::File const*> > >::_Rb_tree_impl<std::less<ld::Atom const*>, true>::_Rb_tree_impl()+40>: vmov.i32 q8, #0 ; 0x00000000
1: x/i $pc
=> 0
diff --git a/CHANGELOG b/CHANGELOG
index 755e084..2099196 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ changed:
* improved and colorized wrapper error/warning/debug/info messages
added:
+* support for ccache symlinks (#34)
* include path warnings for /usr/include and /usr/local/include
#!/usr/bin/env bash
if [ -z "$HOSTPREFIX" ]; then
PLATFORM=$(uname -s)
if [[ $PLATFORM == *NT* ]] || [[ $PLATFORM == *WIN* ]]; then
HOSTPREFIX=i686-w64-mingw32
fi
fi
Program terminated with signal SIGSEGV, Segmentation fault.
#0 poll_for_reply (c=c@entry=0x954070, request=request@entry=57405, reply=reply@entry=0x7fffc629b978, error=error@entry=0x7fffc629ba70) at xcb_in.c:423
423 c->in.current_reply = head->next;
(gdb) print *c
$1 = {has_error = 0, setup = 0x959310, fd = 3, iolock = {__data = {__lock = 1, __count = 0, __owner = 725, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}},
__size = "\001\000\000\000\000\000\000\000\325\002\000\000\001", '\000' <repeats 26 times>, __align = 1}, in = {event_cond = {__data = {__lock = 0, __futex = 23292, __total_seq = 11646, __wakeup_seq = 11646, __woken_seq = 11646,
__mutex = 0x954088, __nwaiters = 0, __broadcast_seq = 0}, __size = "\000\000\000\000\374Z\000\000~-\000\000\000\000\000\000~-\000\000\000\000\000\000~-\000\000\000\000\000\000\210@\225", '\000' <repeats 12 times>,
__align = 100038378258432}, reading = 1,
queue = "\001\000\n\000\b\000\a\000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
print[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
heCore was generated by `/usr/bin/konsole'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 poll_for_reply (c=c@entry=0x954070, request=request@entry=57405, reply=reply@entry=0x7fffc629b978, error=error@entry=0x7fffc629ba70) at xcb_in.c:423
423 c->in.current_reply = head->next;
(gdb) print head
$1 = (struct reply_list *) 0x1
$ cat internal.h
#define DEFINE_SYMBOL(sym, name, _visibility) \
extern const char _##name __asm(#sym); __attribute__((visibility(#_visibility))) const char _##name;
$ cat SDK/src/usr/lib/libc++.c
/*
* Deps:
* /usr/lib/libc++.1.dylib
* /usr/lib/libc++abi.dylib
* /usr/lib/libSystem.B.dylib
diff --git a/build.sh b/build.sh
index b6954c8..f666b3f 100755
--- a/build.sh
+++ b/build.sh
@@ -163,7 +163,7 @@ fi
CCTOOLS="cctools-862-ld64-$LINKER_VERSION"
CCTOOLS_TARBALL=`ls $TARBALL_DIR/$CCTOOLS*.tar.* | head -n1`
-CCTOOLS_REVHASH=`echo "$CCTOOLS_TARBALL" head -n1 | tr '_' ' ' | tr '.' ' ' | awk '{print $3}'`
+CCTOOLS_REVHASH=`echo "$CCTOOLS_TARBALL" | tr '_' ' ' | tr '.' ' ' | awk '{print $3}'`
$ valgrind ld -demangle -object_path_lto /tmp/cc-d8d063.o -dynamic -arch x86_64 -macosx_version_min 10.11.0 -syslibroot [...] -o a.out -lcrt1.10.5.o test.o -lstdc++ -lSystem -lgcc_s.10.5 -v
==4434== Memcheck, a memory error detector
==4434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==4434== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==4434== Command: ld -demangle -object_path_lto /tmp/cc-d8d063.o -dynamic -arch x86_64 -macosx_version_min 10.11.0 -syslibroot [...] -o a.out -lcrt1.10.5.o test.o -lstdc++ -lSystem -lgcc_s.10.5 -v
==4434==
253.3
configured to support archs: armv4t armv5 armv6 armv7 armv7f armv7k armv7s armv6m armv7m armv7em armv8 arm64 arm64v8 i386 x86_64 x86_64h (tvOS)
Library search paths:
[...]
$ valgrind ld -demangle -dynamic -arch arm64 -iphoneos_version_min 8.4.0 -syslibroot [...] -o a.out test.o -lSystem
==32068== Memcheck, a memory error detector
==32068== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==32068== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==32068== Command: ld -demangle -dynamic -arch arm64 -iphoneos_version_min 8.4.0 -syslibroot [...] -o a.out test.o -lSystem
==32068==
==32068== Conditional jump or move depends on uninitialised value(s)
==32068== at 0x43FDD9: Options::minOS(ld::MacVersionMin, ld::IOSVersionMin) (Options.cpp:1463)
==32068== by 0x4397B8: Options::reconfigureDefaults() (Options.cpp:4168)
==32068== by 0x430CE6: Options::Options(int, char const**) (Options.cpp:205)
patching file src/ld/HeaderAndLoadCommands.hpp
patching file src/ld/LinkEdit.hpp
Hunk #4 merged at 1172.
Hunk #6 merged at 1230.
Hunk #7 merged at 1246,1248.
Hunk #8 merged at 1261.
Hunk #13 merged at 1386,1388.
patching file src/ld/LinkEditClassic.hpp
patching file src/ld/Options.cpp
Hunk #2 merged at 637,640, NOT MERGED at 643-649.