OSDN Git Service

uclinux-h8/uClibc.git
19 years agoBugfix: Add r_addend to final address. The r_addend is mostly zero
Joakim Tjernlund [Fri, 17 Sep 2004 12:19:35 +0000 (12:19 -0000)]
Bugfix: Add r_addend to final address. The r_addend is mostly zero
but can be nonzero for JMP relocs as well.
All Rela arches need to do this, test and send a patch :)

Remove unneeded test in R_PPC_COPY.

19 years agoDon't allow undefined global symbols to pass(all archs needs fixing,
Joakim Tjernlund [Fri, 17 Sep 2004 09:11:53 +0000 (09:11 -0000)]
Don't allow undefined global symbols to pass(all archs needs fixing,
but powerpc).
If you are using buildroot and soft floating point, you may have to
rebuild the libm.so library, copy it to staging_dir/lib and rebuild
your application.

Move handling of R_386_COPY back into _dl_do_reloc(all archs should
do this). Adjust the first argument to _dl_memcpy as it looks wrong
to have symtab[symtab_index].st_value as destination for the mem copy.

19 years agoDon't allow undefined global symbols to pass(all archs needs fixing).
Joakim Tjernlund [Thu, 16 Sep 2004 13:07:01 +0000 (13:07 -0000)]
Don't allow undefined global symbols to pass(all archs needs fixing).
If you are using buildroot and soft floating point, you may have to
rebuild the libm.so library, copy it to staging_dir/lib and rebuild
your application.

Cleanups as well.

19 years agoHide some x86-specific devel asserts.
Manuel Novoa III [Fri, 10 Sep 2004 21:30:26 +0000 (21:30 -0000)]
Hide some x86-specific devel asserts.

19 years agoFixup URL
Eric Andersen [Wed, 8 Sep 2004 20:13:05 +0000 (20:13 -0000)]
Fixup URL

19 years agoSecond attempt to fix the INIT/FINI order. This time I think I got it right :)
Joakim Tjernlund [Wed, 8 Sep 2004 09:43:25 +0000 (09:43 -0000)]
Second attempt to fix the INIT/FINI order. This time I think I got it right :)
This needs testing with apps that have complex dependencies.

19 years agoDoh! As noted by Mike Frysinger I was too agressive at culling stuff
Eric Andersen [Wed, 8 Sep 2004 03:07:17 +0000 (03:07 -0000)]
Doh!  As noted by Mike Frysinger I was too agressive at culling stuff

19 years agoDisable prototypes for unimplemented functions
Eric Andersen [Tue, 7 Sep 2004 11:24:45 +0000 (11:24 -0000)]
Disable prototypes for unimplemented functions

19 years agoYet another bit of joy for mjn3
Eric Andersen [Tue, 7 Sep 2004 11:13:06 +0000 (11:13 -0000)]
Yet another bit of joy for mjn3

19 years agoAudit and disable unimplemented stuff
Eric Andersen [Tue, 7 Sep 2004 10:37:36 +0000 (10:37 -0000)]
Audit and disable unimplemented stuff

19 years agoImplement gethostent_r
Eric Andersen [Tue, 7 Sep 2004 10:34:35 +0000 (10:34 -0000)]
Implement gethostent_r

19 years agoRemove stale leftovers
Eric Andersen [Tue, 7 Sep 2004 10:34:09 +0000 (10:34 -0000)]
Remove stale leftovers

19 years agoAudit and scrub malloc.h, which was a mess
Eric Andersen [Tue, 7 Sep 2004 09:17:17 +0000 (09:17 -0000)]
Audit and scrub malloc.h, which was a mess

19 years agoWe do not use dl_iterate_phdr, so no need to define it
Eric Andersen [Tue, 7 Sep 2004 09:04:01 +0000 (09:04 -0000)]
We do not use dl_iterate_phdr, so no need to define it

19 years agouClibc gettext support is under development and really shouldn't
Eric Andersen [Tue, 7 Sep 2004 08:53:33 +0000 (08:53 -0000)]
uClibc gettext support is under development and really shouldn't
be used by the unsuspecting masses quite yet.

19 years agoThe 'Somebody Else's Problem Field' was just activated
Eric Andersen [Tue, 7 Sep 2004 08:44:19 +0000 (08:44 -0000)]
The 'Somebody Else's Problem Field' was just activated

19 years agoFirst pass prototype removals from auditing header files:
Eric Andersen [Tue, 7 Sep 2004 08:40:43 +0000 (08:40 -0000)]
First pass prototype removals from auditing header files:
a.out.h to libgen.h (omitting complex.h for a later separate
effort for the math stuff)

19 years agoUse a more appealing name, matching the function prototype
Eric Andersen [Tue, 7 Sep 2004 08:36:25 +0000 (08:36 -0000)]
Use a more appealing name, matching the function prototype

19 years agoAdd missing imaxdiv and lldiv needed for SuSv3. Adjust ldiv to
Eric Andersen [Tue, 7 Sep 2004 08:30:56 +0000 (08:30 -0000)]
Add missing imaxdiv and lldiv needed for SuSv3.  Adjust ldiv to
match glibc's quotient truncation behavior.

19 years agoFirst attempt to fix the INIT/FINI ordering. Fingers crossed :)
Joakim Tjernlund [Fri, 3 Sep 2004 21:17:10 +0000 (21:17 -0000)]
First attempt to fix the INIT/FINI ordering. Fingers crossed :)

19 years agoAdd a couple of mips-specific string funcs.
Manuel Novoa III [Thu, 2 Sep 2004 14:39:38 +0000 (14:39 -0000)]
Add a couple of mips-specific string funcs.
Port the generic optimized string funcs from glibc, with some tweaks
  to cut their size a little.  The main change is making memmove
  call memcpy for forward copying to trim redundant code.
Make use of both the generic and arch-specific speed-optimized string
  funcs configurable.  Arch-specific take precedence over generic,
  and generic takes precedence over basic size-optimized uClibc funcs.

19 years agoFix a couple of symbol name issues.
Manuel Novoa III [Thu, 2 Sep 2004 14:34:53 +0000 (14:34 -0000)]
Fix a couple of symbol name issues.

19 years agoRemove unused variables. From Peter Mazinger.
Joakim Tjernlund [Thu, 2 Sep 2004 07:12:10 +0000 (07:12 -0000)]
Remove unused variables. From Peter Mazinger.

19 years agoRestore item I erronenously removed, mention mips string funcs
Eric Andersen [Tue, 31 Aug 2004 08:49:06 +0000 (08:49 -0000)]
Restore item I erronenously removed, mention mips string funcs

19 years agoDont mess with __curbrk in ldso
Eric Andersen [Tue, 31 Aug 2004 08:45:03 +0000 (08:45 -0000)]
Dont mess with __curbrk in ldso

19 years agoTypo fix from Peter Mazinger.
Joakim Tjernlund [Mon, 30 Aug 2004 11:37:47 +0000 (11:37 -0000)]
Typo fix from Peter Mazinger.

19 years agoMention kernel abi selection
Eric Andersen [Mon, 30 Aug 2004 07:40:15 +0000 (07:40 -0000)]
Mention kernel abi selection

19 years agosolar asked that this bit be reverted.
Manuel Novoa III [Sat, 28 Aug 2004 21:09:16 +0000 (21:09 -0000)]
solar asked that this bit be reverted.

19 years agoPreliminary PIE support for powerpc, i386 was used as template.
Joakim Tjernlund [Fri, 27 Aug 2004 15:14:55 +0000 (15:14 -0000)]
Preliminary PIE support for powerpc, i386 was used as template.
Requested by Peter Mazinger. Testing wanted.

19 years ago#include "dl-startup.c into ldso.c, making ldso one compilation unit.
Joakim Tjernlund [Fri, 27 Aug 2004 11:08:35 +0000 (11:08 -0000)]
#include "dl-startup.c into ldso.c, making ldso one compilation unit.
Now all functions and vaiables can be made static to reduce relocs.
Basicly, all variables should be merged into one struct variable
and then export that struct. Exported functions should be exported
as functions pointers in the above struct. This will reduce the
number of relocs inside ldso to a handful.

Add -Bsymbolic to linker for ldso. This will resolve all functions
(all JMP_SLOT goes away) and the remaining relocs are transformed into
RELATIVE relocs.

19 years agoForgot to commit this file. Patch from Stefan Allius.
Joakim Tjernlund [Fri, 27 Aug 2004 09:15:11 +0000 (09:15 -0000)]
Forgot to commit this file. Patch from Stefan Allius.

19 years agoAs Mike Frysinger notes, this code is still needed. I
Joakim Tjernlund [Fri, 27 Aug 2004 08:46:19 +0000 (08:46 -0000)]
As Mike Frysinger notes, this code is still needed. I
misread this code and removed it, sorry.

I printed the values of _dl_brkp and _dl_envp in ldso and
got this when executing:
ls:
   __curbrk: 0x300c16e0
   __environ: 0x1008372c
ldd:
  __curbrk: 0x300776e0
  __environ: 0x3007759c

why is__environ in the app when executing ls but not ldd?

19 years agoPartial patch from Alexandre Oliva to update the frv port
Eric Andersen [Thu, 26 Aug 2004 23:39:02 +0000 (23:39 -0000)]
Partial patch from Alexandre Oliva to update the frv port

19 years agoPatch from Alexandre Oliva to update the frv default config
Eric Andersen [Thu, 26 Aug 2004 23:37:48 +0000 (23:37 -0000)]
Patch from Alexandre Oliva to update the frv default config

19 years agoPartial patch from Alexandre Oliva:
Eric Andersen [Thu, 26 Aug 2004 23:36:04 +0000 (23:36 -0000)]
Partial patch from Alexandre Oliva:

- adjust licensing terms of sources for crt*.o

- change the stat ABI to speed it up, matching changes in the kernel

- assorted bug-fixes, improvements and updates in the FR-V port

etc.

19 years agoMention FunctionCheck
Eric Andersen [Thu, 26 Aug 2004 22:08:19 +0000 (22:08 -0000)]
Mention FunctionCheck

19 years agoUpdate TODO list a bit
Eric Andersen [Thu, 26 Aug 2004 22:07:56 +0000 (22:07 -0000)]
Update TODO list a bit

19 years agoOnly print debug stuff when asked
Eric Andersen [Thu, 26 Aug 2004 20:43:25 +0000 (20:43 -0000)]
Only print debug stuff when asked

19 years agoFixup a couple of warnings
Eric Andersen [Thu, 26 Aug 2004 18:38:19 +0000 (18:38 -0000)]
Fixup a couple of warnings

19 years agoAvoid multiple passes to perform mips GOT relocations, and do
Eric Andersen [Thu, 26 Aug 2004 18:36:23 +0000 (18:36 -0000)]
Avoid multiple passes to perform mips GOT relocations, and do
the whole lot in a single pass.
 -Erik

19 years agoFixes from gentoo.
Manuel Novoa III [Thu, 26 Aug 2004 17:03:09 +0000 (17:03 -0000)]
Fixes from gentoo.

19 years agoLet ldso find libc's malloc function and set _dl_malloc_function.
Joakim Tjernlund [Thu, 26 Aug 2004 14:17:10 +0000 (14:17 -0000)]
Let ldso find libc's malloc function and set _dl_malloc_function.
This removes some crap in libdl.c(and future libs which needs
to access ldso functions).
What do you think?

19 years agoAdded test for RTLD_GLOBAL flag in _dl_find_hash().
Joakim Tjernlund [Thu, 26 Aug 2004 14:00:04 +0000 (14:00 -0000)]
Added test for RTLD_GLOBAL flag in _dl_find_hash().
Fixed a bug in libdl.c where the RTLD_GLOBAL was assigned
wronly.

19 years agoRelocations of the application's global GOT entries were not being run, and
Eric Andersen [Thu, 26 Aug 2004 11:30:48 +0000 (11:30 -0000)]
Relocations of the application's global GOT entries were not being run, and
only the global GOT entry relocations for the loaded shared libs were being
handled.  This made applications segfault when using un-fixedup symbols.  After
many hours debugging to track down the problem, this patch makes the mips port
happy again.
 -Erik

19 years agoStefan Allius writes:
Joakim Tjernlund [Thu, 26 Aug 2004 09:40:09 +0000 (09:40 -0000)]
Stefan Allius writes:
"I fixed the _dl_parse_copy_information in the same way than for the
powerpc and it works fine for me.
You may luck at the patch for the powerpc/elfinterp.c, where I change
the paramter of a dl_dprintf statement. Now we use the same
parameters than for the relocation copy."

Arch mantainers, please do the same.
When all arches has been fixed, we can remove of _dl_parse_copy_information,
it is just a waste of CPU cycles.

19 years agoMike Frysinger writes:
Eric Andersen [Wed, 25 Aug 2004 23:46:46 +0000 (23:46 -0000)]
Mike Frysinger writes:

this was sent earlier in a different form:
http://www.uclibc.org/lists/uclibc/2004-January/008136.html
find attached a smaller version ... perhaps adding a fprintf to stderr before
calling abort would be nice like in the glibc patch, but whatever

glibc has since adopted a similar fix for their malloc (third hunk, line 1970)
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/malloc/malloc.c.diff?r1=1.121&r2=1.122&cvsroot=glibc&f=h
-mike

19 years agoMike Frysinger writes:
Eric Andersen [Wed, 25 Aug 2004 23:42:46 +0000 (23:42 -0000)]
Mike Frysinger writes:

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

19 years agoJoakim Tjernlund writes:
Eric Andersen [Wed, 25 Aug 2004 23:10:43 +0000 (23:10 -0000)]
Joakim Tjernlund writes:

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

19 years agoPatch by Carl SHAW <carl.shaw@st.com>...
Manuel Novoa III [Wed, 25 Aug 2004 17:24:19 +0000 (17:24 -0000)]
Patch by Carl SHAW <carl.shaw@st.com>...

  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...

19 years agoPatch from Stefan Allius:
Joakim Tjernlund [Wed, 25 Aug 2004 15:19:00 +0000 (15:19 -0000)]
Patch from Stefan Allius:
 Remove unused function parameter in ldso.
 Remove echo  option '-e' since it is not supported on Solaris.

19 years agoHopefully fix Laszlo and Jacobs dlopen problem.
Joakim Tjernlund [Wed, 25 Aug 2004 14:22:05 +0000 (14:22 -0000)]
Hopefully fix Laszlo and Jacobs dlopen problem.

19 years agoNote a security item for the next release
Eric Andersen [Mon, 23 Aug 2004 20:09:15 +0000 (20:09 -0000)]
Note a security item for the next release

19 years agoMake the stub profiling stuff work
Eric Andersen [Sun, 22 Aug 2004 06:04:57 +0000 (06:04 -0000)]
Make the stub profiling stuff work

19 years agoThe "Delete current profiling code because it is complete crap"
Eric Andersen [Sat, 21 Aug 2004 21:42:51 +0000 (21:42 -0000)]
The "Delete current profiling code because it is complete crap"
TODO item is now done.

19 years agoAttempt to support 'gcc -finstrument-functions', which seems much
Eric Andersen [Sat, 21 Aug 2004 21:39:51 +0000 (21:39 -0000)]
Attempt to support 'gcc -finstrument-functions', which seems much
more sane than 'gcc -pg' and seems much easier to support.
 -Erik

19 years agoKill off all support for 'gcc -pg' / 'gprof' style profiling. There is both a
Eric Andersen [Sat, 21 Aug 2004 21:19:29 +0000 (21:19 -0000)]
Kill off all support for 'gcc -pg' / 'gprof' style profiling.  There is both a
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

19 years agoEnable only for architectures where __NR_madvise is defined
Eric Andersen [Fri, 20 Aug 2004 20:46:01 +0000 (20:46 -0000)]
Enable only for architectures where __NR_madvise is defined
 -Erik

19 years agoNever directly include kernel sources
Eric Andersen [Thu, 19 Aug 2004 23:04:26 +0000 (23:04 -0000)]
Never directly include kernel sources

19 years ago'pagesize' was local to dl-startup.c. In ldso.c we need
Eric Andersen [Thu, 19 Aug 2004 20:21:26 +0000 (20:21 -0000)]
'pagesize' was local to dl-startup.c.  In ldso.c we need
to use '_dl_pagesize'
 -Erik

19 years agoFix dependencies.
Manuel Novoa III [Thu, 19 Aug 2004 16:44:19 +0000 (16:44 -0000)]
Fix dependencies.

19 years agoAccunt for ELF_MACHINE_PLTREL_OVERLAP when relocating ldso.
Joakim Tjernlund [Thu, 19 Aug 2004 09:52:27 +0000 (09:52 -0000)]
Accunt for ELF_MACHINE_PLTREL_OVERLAP when relocating ldso.

19 years agoRemove poor man's malloc. Not needed anymore.
Joakim Tjernlund [Thu, 19 Aug 2004 09:34:11 +0000 (09:34 -0000)]
Remove poor man's malloc. Not needed anymore.

19 years agoMove "debug_addr" ptr from dl-startup.c to ldso.c
Joakim Tjernlund [Thu, 19 Aug 2004 09:06:15 +0000 (09:06 -0000)]
Move "debug_addr" ptr from dl-startup.c to ldso.c

19 years agoMove the app specific stuff from dl-startup.c to ldso.c.
Joakim Tjernlund [Thu, 19 Aug 2004 08:53:29 +0000 (08:53 -0000)]
Move the app specific stuff from dl-startup.c to ldso.c.

19 years agoOops, forgot to remove unused variable.
Joakim Tjernlund [Thu, 19 Aug 2004 08:08:27 +0000 (08:08 -0000)]
Oops, forgot to remove unused variable.

19 years agoThis is now done in ldso.c
Joakim Tjernlund [Thu, 19 Aug 2004 08:03:58 +0000 (08:03 -0000)]
This is now done in ldso.c

19 years agoClean up the _dl_boot code and make it similar to arm and sh.
Joakim Tjernlund [Wed, 18 Aug 2004 09:26:17 +0000 (09:26 -0000)]
Clean up the _dl_boot code and make it similar to arm and sh.

19 years agoCarl SHAW writes:
Eric Andersen [Tue, 17 Aug 2004 20:00:42 +0000 (20:00 -0000)]
Carl SHAW writes:

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

19 years agoDavid McCulloug writes:
Joakim Tjernlund [Tue, 17 Aug 2004 13:55:49 +0000 (13:55 -0000)]
David McCulloug writes:
"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.

19 years agoLet ldso decide if it should relocate itselft a second time. This
Joakim Tjernlund [Tue, 17 Aug 2004 13:37:54 +0000 (13:37 -0000)]
Let ldso decide if it should relocate itselft a second time. This
is needed if ldso should use libcs malloc whenever possible.

Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by
libdl.

19 years agoFix make clean rule.
Joakim Tjernlund [Tue, 17 Aug 2004 13:09:01 +0000 (13:09 -0000)]
Fix make clean rule.

19 years agoAudit pthread.h and exclude prototypes for pthread functions
Eric Andersen [Mon, 16 Aug 2004 22:55:01 +0000 (22:55 -0000)]
Audit pthread.h and exclude prototypes for pthread functions
that are not presently implemented in uClibc's libpthread.
 -Erik

19 years agoI will always test before I commit.
Eric Andersen [Mon, 16 Aug 2004 22:16:45 +0000 (22:16 -0000)]
I will always test before I commit.
I will always test before I commit.
I will always test before I commit.
 -Erik

19 years agoSetup __pagesize from inside __uClibc_init(), or else when registering
Eric Andersen [Mon, 16 Aug 2004 20:35:15 +0000 (20:35 -0000)]
Setup __pagesize from inside __uClibc_init(), or else when registering
dtors via atexit(), atexit may need to call realloc with __pagesize
still set to 0.  ugh.
 -Erik

19 years agoBe a bit more prominant about the fact that setuid handling
Eric Andersen [Mon, 16 Aug 2004 19:22:52 +0000 (19:22 -0000)]
Be a bit more prominant about the fact that setuid handling
is not quite there...

19 years agoThe variable used to store pagesize is not the same as the
Eric Andersen [Mon, 16 Aug 2004 19:21:45 +0000 (19:21 -0000)]
The variable used to store pagesize is not the same as the
_dl_pagesize variable in ldso, so avoid aliasing.
 -Erik

19 years agoThe pagesize variable used when starting up is _not_ the same
Eric Andersen [Mon, 16 Aug 2004 19:17:37 +0000 (19:17 -0000)]
The pagesize variable used when starting up is _not_ the same
as the _dl_pagesize global, so do not alias the global.
 -Erik

19 years agoUpdate to add missing c++ namespace support.
Manuel Novoa III [Sun, 15 Aug 2004 08:01:45 +0000 (08:01 -0000)]
Update to add missing c++ namespace support.

19 years agoDo not fail all lookups when /etc/resolv.conf is missing, as i.e.
Eric Andersen [Sun, 15 Aug 2004 03:59:36 +0000 (03:59 -0000)]
Do not fail all lookups when /etc/resolv.conf is missing, as i.e.
checking on 127.0.0.1 is still valid w/o resolv.conf
 -Erik

19 years agoLogic was reversed.
Manuel Novoa III [Sun, 15 Aug 2004 01:55:02 +0000 (01:55 -0000)]
Logic was reversed.

19 years agoreq_search returned garbage. This teaches it to behave itself and
Eric Andersen [Sat, 14 Aug 2004 07:23:48 +0000 (07:23 -0000)]
req_search returned garbage.  This teaches it to behave itself and
return the length and the actual dns packet as received, rather than
making stuff up.
 -Erik

19 years agoFixup PAGE_SIZE problems
Eric Andersen [Fri, 13 Aug 2004 23:39:45 +0000 (23:39 -0000)]
Fixup PAGE_SIZE problems
 -Erik

19 years agoFix usage_count in ldso/libdl.
Joakim Tjernlund [Fri, 13 Aug 2004 13:56:25 +0000 (13:56 -0000)]
Fix usage_count in ldso/libdl.
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.

19 years agoAlways include the sqrtf wrapper in libm so that we don't need to worry
Manuel Novoa III [Fri, 13 Aug 2004 04:35:03 +0000 (04:35 -0000)]
Always include the sqrtf wrapper in libm so that we don't need to worry
about conditionally configuring something else for libstdc++.

19 years agoFix mips bug related to 2.6 headers by following glibc's lead. Based on
Manuel Novoa III [Tue, 10 Aug 2004 18:47:06 +0000 (18:47 -0000)]
Fix mips bug related to 2.6 headers by following glibc's lead.  Based on
the comment, newer kernels appended "64" to __NR_pread and __NR_pwrite.

19 years agoApparently the sigaction code added was broken, as it generated illegal
Manuel Novoa III [Tue, 10 Aug 2004 16:43:12 +0000 (16:43 -0000)]
Apparently the sigaction code added was broken, as it generated illegal
instruction errors.  Disable it for now.

19 years agoOptimze _dl_memset() for PowerPC.
Joakim Tjernlund [Tue, 10 Aug 2004 15:25:35 +0000 (15:25 -0000)]
Optimze _dl_memset() for PowerPC.
Other arches may also benefit from this iff it can do
unaligned stores.

19 years agoForgot _dl_memcpy in previous checkin.
Joakim Tjernlund [Tue, 10 Aug 2004 15:18:18 +0000 (15:18 -0000)]
Forgot _dl_memcpy in previous checkin.

19 years agoOn Monday 02 August 2004 08:44 am, Mike Frysinger wrote:
Manuel Novoa III [Tue, 10 Aug 2004 15:12:48 +0000 (15:12 -0000)]
On Monday 02 August 2004 08:44 am, Mike Frysinger wrote:
> 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 :)

19 years agoAt solar's request...
Manuel Novoa III [Tue, 10 Aug 2004 15:11:51 +0000 (15:11 -0000)]
At solar's request...

19 years ago_dl_strlen,_dl_strcat,_dl_strcpy,_dl_strcmp,_dl_strncmp,
Joakim Tjernlund [Tue, 10 Aug 2004 15:06:30 +0000 (15:06 -0000)]
_dl_strlen,_dl_strcat,_dl_strcpy,_dl_strcmp,_dl_strncmp,
_dl_strchr,_dl_strrchr,_dl_strstr,_dl_memcmp:
Optimize for archs which can do pre increment/decrement and load/store
in one instruction.

19 years ago_dl_get_last_path_component:
Joakim Tjernlund [Tue, 10 Aug 2004 14:44:34 +0000 (14:44 -0000)]
_dl_get_last_path_component:
  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.

19 years agoRevmoved _dl_brkp and _dl_envp. They are not needed anymore.
Joakim Tjernlund [Tue, 10 Aug 2004 10:04:35 +0000 (10:04 -0000)]
Revmoved _dl_brkp and _dl_envp. They are not needed anymore.

19 years agoMike Frysinger writes:
Joakim Tjernlund [Tue, 10 Aug 2004 09:50:07 +0000 (09:50 -0000)]
Mike Frysinger writes:
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

19 years agoMike Frysinger writes:
Joakim Tjernlund [Tue, 10 Aug 2004 09:23:57 +0000 (09:23 -0000)]
Mike Frysinger writes:
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.

19 years agoMike Frysinger writes:
Joakim Tjernlund [Tue, 10 Aug 2004 08:58:12 +0000 (08:58 -0000)]
Mike Frysinger writes:
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.

19 years agoOops.
Joakim Tjernlund [Mon, 9 Aug 2004 08:35:31 +0000 (08:35 -0000)]
Oops.

19 years agoFrom: uclibc-bounces@uclibc.org on behalf of Peter Kjellerstedt
Joakim Tjernlund [Mon, 9 Aug 2004 08:28:00 +0000 (08:28 -0000)]
From: uclibc-bounces@uclibc.org on behalf of Peter Kjellerstedt
[peter.kjellerstedt@axis.com]
Peter Kellerstedt writes:

May I suggest the attached patch instead?
It handles PICFLAG the same way as it was already done
for other architectures (e.g., CRIS and frv).

19 years agoThis should fix the dlsym problem Peter van Hoyweghen reported.
Joakim Tjernlund [Mon, 9 Aug 2004 08:11:54 +0000 (08:11 -0000)]
This should fix the dlsym problem Peter van Hoyweghen reported.
However RTLD_LOCAL still doesn't work. Everything is RTLD_GLOBAL.

19 years agoJoakim Tjernlund writes:
Eric Andersen [Fri, 6 Aug 2004 16:12:11 +0000 (16:12 -0000)]
Joakim Tjernlund writes:

PPC32, SPARC32/64 and S390 includes the PLT in its RELA size. This caused ldso
to always do unlazy relocation of the JMPRELs. This patch fixes it.