Age | Commit message (Collapse) | Author |
|
i sent this earlier but perhaps people missed it the first time around :)
http://www.uclibc.org/lists/uclibc/2004-August/009544.html
basically if you try to #include <sys/ucontext.h> on arm it'll fail because
ucontext.h utilizes typedefs found in bits/sigcontext.h ... i386 already has
this fix in uClibc
find attached a trivial patch to fix this
-mike
|
|
Hi Manuel & Erik
I think I know why MIPS is broken. _dl_perform_mips_global_got_relocations() is
broken. It will due to my latest changes reloctate ldso. This
function needs to die and its job should be done inside _dl_parse_relocation_information().
It is mostly a copy and paste job,
Also PERFORM_BOOTSTRAP_GOT and PERFORM_BOOTSTRAP_RELOCATION should be fixed, they
use symbols which aren't passed as arguments.
Jocke
|
|
Below is a patch to make the pread and pwrite calls work on the SH
architecture. I've only tested this on the SH4 with a 2.4.24 kernel - a
fairly recent kernel is required as the problem is partially fixed in
the kernel itself. For more information (in relation to glibc, but the
problem is the same) see the thread at
http://sourceforge.net/mailarchive/message.php?msg_id=2375908
Someone should really test this on the SH2/3...
|
|
Remove unused function parameter in ldso.
Remove echo option '-e' since it is not supported on Solaris.
|
|
|
|
|
|
|
|
TODO item is now done.
|
|
more sane than 'gcc -pg' and seems much easier to support.
-Erik
|
|
size and performance penalty to profiling applications this way, as well as
Heisenberg effects, where the act of measuring changes what is measured.
There are better tools for doing profiling, such as OProfile, that do not
require gcc to instrument the application code.
-Erik
|
|
-Erik
|
|
|
|
to use '_dl_pagesize'
-Erik
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I finally tracked down the problem with SH4 shared library loading -
in file ldso/ldso/sh/dl-startup.h, the line
#define DL_BOOT(X) static void __attribute_used__ _dl_boot2 (X)
should be
#define DL_BOOT(X) static void* __attribute_used__ _dl_boot2 (X)
otherwise the application code will never be called and _dl_boot will
just return causing a segmentation fault.
Carl
|
|
"There's a bug in the SH asm, it calls into 'C' code without preserving
all the important scratch registers. I have been meaning to double
check the changes as I think more registers need to be saved, then I
was going to send it back to uClibc. From the sound of it this isn't
your problem, but you never know.
Attached is the patch as it stands for the loader on SH."
Glibc appears to do the same.
|
|
is needed if ldso should use libcs malloc whenever possible.
Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by
libdl.
|
|
|
|
that are not presently implemented in uClibc's libpthread.
-Erik
|
|
I will always test before I commit.
I will always test before I commit.
-Erik
|
|
dtors via atexit(), atexit may need to call realloc with __pagesize
still set to 0. ugh.
-Erik
|
|
is not quite there...
|
|
_dl_pagesize variable in ldso, so avoid aliasing.
-Erik
|
|
as the _dl_pagesize global, so do not alias the global.
-Erik
|
|
|
|
checking on 127.0.0.1 is still valid w/o resolv.conf
-Erik
|
|
|
|
return the length and the actual dns packet as received, rather than
making stuff up.
-Erik
|
|
-Erik
|
|
Don't' use atexit in libdl.
Make destrutor in libdl actually run and to dlclose all
dlopened libs.
Remove dlclosed libs from the _dl_symbol_tables list.
|
|
about conditionally configuring something else for libstdc++.
|
|
the comment, newer kernels appended "64" to __NR_pread and __NR_pwrite.
|
|
instruction errors. Disable it for now.
|
|
Other arches may also benefit from this iff it can do
unaligned stores.
|
|
|
|
> the gethostbyname_r() call itself is not segfaulting, but the memory
> returned in the h_aliases array seems to be wrong ...
was playing around with the source today and eventually the obvious answer hit
me ... while read_etc_hosts_r() generatings an array of strings fo h_aliases
and populates it, the dns path does not :)
find attached a patch that'll actually generate the h_aliases list in the
normal dns code path ... i used the etc_hosts_r() code as a template for some
of it ...
note that this is just a simple fix ... it fills the alias list with just the
hostname gethostbyname_r was passed ... the proper fix i think would be to
parse the dns packet down in __dns_lookup() and pass the info back via the
resolv_answer struct ...
but this fix is better than the current state of things ... that is, h_aliases
currently is never initailized in the dns code path :)
|
|
|
|
_dl_strchr,_dl_strrchr,_dl_strstr,_dl_memcmp:
Optimize for archs which can do pre increment/decrement and load/store
in one instruction.
|
|
handle "" strings and optimze it.
_dl_simple_ltoa,_dl_simple_ltoahex:
Optimize for archs which can do pre increment/decrement and load/store
in one instruction.
|
|
|
|
i was sticking some libraries in non-standard (i.e. not-hardcoded) paths and
then updating ld.so.conf accordingly ... oddly though, i couldnt get binaries
that linked against those libraries to run ... `ldconfig -v` showed the
required libraries being detected/cached, so something seemed wrong ...
turns out the libraries were being tagged as LIB_ELF_LIBC0 in the cache and
the loader currently only accepts LIB_ELF_LIBC{5,6} ... since readsoname.c in
ldconfig defines needed_tab with the mapping 'libc.so.0' -> LIB_ELF_LIBC0 it
seems like the loader should accept this type too
find attached a small patch which adds LIB_ELF_LIBC0 along side
LIB_ELF_LIBC{5,6} as an accepted lib type in the loader when dealing with the
ld.so.cache file
|
|
in libdl, the XXFLAGS is set incorrectly if DODEBUG=y ... it has 'I.' added to
it instead of '-I.' ... this of course pisses of gcc :)
find attached a patch that cleans up the XXFLAGS setting so as to minimize
this kind of thing ... when asked, mjn3 said it was a kosher idea ;)
and later writes:
hmm it seems ldso also utilizes USE_CACHE in the code (but LIBRARY_CACHE never
propogates down to the Makefiles)
so the fix is to add $(LIBRARY_CACHE) while setting $(XXFLAGS)
Applied with minor fixes and also fixed up ldso/Makefile to match
libdl/Makefile.
|
|
while playing around with Gentoo on uClibc, i hit some troubles with ldconfig
first, i found that it kept trying to read 'etc/ld.so.conf' ... it didnt want
to read '/etc/ld.so.conf' ... looking at the source, the default conf file is
defined as UCLIBC_RUNTIME_PREFIX "etc/ld.so.conf" ... all fine and dandy, but
the utils/Makefile builds the .c files with this:
-DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX)
i couldnt find where R_PREFIX was defined/used anywhere else, but i did find
that every other time UCLIBC_RUNTIME_PREFIX was defined, it was set like:
-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\"
changing the utils/Makefile to be like this fixed things for me
next up, i found that i wasnt getting an /etc/ld.so.cache file when i ran
`ldconfig` ... looking at the code, USE_CACHE needs to be defined ...
Rules.mak has a line that reads LIBRARY_CACHE:=#-DUSE_CACHE by default, but
then LIBRARY_CACHE is never used anywhere :)
so the fix here is to add $(LIBRARY_CACHE) to the lines in utils/Makefile
where the .c files are compiled
perhaps a suggestion then ? in my mind it makes sense to utilize a cache file
when running uclibc native but perhaps not while cross compiling ... so
perhaps add LIBRARY_CACHE:=-DUSE_CACHE to the section in Rules.mak where LDSO
is set to the uclibc linker (i.e. native) but set LIBRARY_CACHE:=#-DUSE_CACHE
where LDSO is the $(SYSTEM_LDSO) (i.e. cross compiling)
Applied with minor fixes.
|