OSDN Git Service
Eric Andersen [Sat, 7 Feb 2004 10:40:25 +0000 (10:40 -0000)]
Split off the stuff that cannot use function into its own file,
to make it easier to treat it specially while not bothering the
rest of the code with the same constraints.
Eric Andersen [Sat, 7 Feb 2004 10:12:25 +0000 (10:12 -0000)]
Step one, begin shuffling things around a bit
Eric Andersen [Sat, 7 Feb 2004 09:54:46 +0000 (09:54 -0000)]
Yet more consistancy fixups
Eric Andersen [Sat, 7 Feb 2004 09:53:43 +0000 (09:53 -0000)]
Use unsigned char * pointers
Eric Andersen [Fri, 6 Feb 2004 11:12:44 +0000 (11:12 -0000)]
Trim trailing whitespace
Eric Andersen [Fri, 6 Feb 2004 11:11:23 +0000 (11:11 -0000)]
Remove trailing whitespace
Eric Andersen [Fri, 6 Feb 2004 07:09:46 +0000 (07:09 -0000)]
Fix completely hosed up formatting
Eric Andersen [Fri, 6 Feb 2004 07:07:16 +0000 (07:07 -0000)]
Sigh. The 2.6.x kernel removed '__kernel_dev_t' and renamed it as
'__kernel_old_dev_t'. And of course there is no good way to know
which is in use except checking linux/version.h. Grumble.
This is rather lame, but for now, define __kernel_old_dev_t to be
the same as __kernel_dev_t. This will want to be revisited soon.
-Erik
Manuel Novoa III [Thu, 5 Feb 2004 14:53:22 +0000 (14:53 -0000)]
Patch from Alan Hourihane <alanh@fairlite.demon.co.uk> for building alpha.
Manuel Novoa III [Thu, 5 Feb 2004 02:38:27 +0000 (02:38 -0000)]
Allow building on 64 bit archs. Hopefully the last cvs activity this
stuff will see other than "delete".
Eric Andersen [Thu, 5 Feb 2004 02:17:02 +0000 (02:17 -0000)]
Use 'mmap.c' instead of '_mmap.c'
Eric Andersen [Thu, 5 Feb 2004 01:54:33 +0000 (01:54 -0000)]
Fixup a badly merged update
-Erik
Eric Andersen [Wed, 4 Feb 2004 10:24:12 +0000 (10:24 -0000)]
Use a static const char array for static strings
Manuel Novoa III [Tue, 3 Feb 2004 17:33:50 +0000 (17:33 -0000)]
Today's Toni's birthday. Seems an appropriate day to add this.
Manuel Novoa III [Mon, 2 Feb 2004 22:27:22 +0000 (22:27 -0000)]
Use the correct configuration test define.
Eric Andersen [Sun, 1 Feb 2004 11:10:32 +0000 (11:10 -0000)]
The code for checking the rpath was not finding the rpath
value correctly, since it forgot to lookup the correct value
in the string table.
Eric Andersen [Sun, 1 Feb 2004 08:30:55 +0000 (08:30 -0000)]
Jakub Bogusz writes:
Hello,
the attached patch fixes ldso compilation on sparc-linux (at least with
sparc32 userland). It was made against uClibc 0.9.21, but it's still OK
with 0.9.26.
There were three problems:
- missing __NR_getpid definition
- conflicting prototypes in elfinterp.c
- syntax error (missing semicolon) in ldso.c
With this patch shared libraries and ldso can be built on sparc.
It contains also ldso.c syntax fix for m68k - there was the same
mistake two lines earlier; but I didn't test build on m68k.
Eric Andersen [Sat, 31 Jan 2004 03:15:07 +0000 (03:15 -0000)]
Revert to scope as used by original code for now, just in case.
I still don't have a good handle on why and when the different
scope values should be used.
Eric Andersen [Sat, 31 Jan 2004 03:02:39 +0000 (03:02 -0000)]
Patch from Paul Mundt, lethal at linux-sh dot org,
add sh/sh64: ABORT_INSTRUCTION definitions
Eric Andersen [Fri, 30 Jan 2004 22:10:39 +0000 (22:10 -0000)]
Andrew May writes:
Here are some simple fixes for things that broke for PPC with
the recent syscall cleanup. I am not sure they are correct but
they seem pretty trivial.
Eric Andersen [Fri, 30 Jan 2004 21:13:24 +0000 (21:13 -0000)]
Add missing abort instruction for powerpc
Eric Andersen [Fri, 30 Jan 2004 21:11:18 +0000 (21:11 -0000)]
Paul Mundt, lethal at linux-sh dot org writes:
Boredom got the better of me, here's strlen() for sh64..
Eric Andersen [Fri, 30 Jan 2004 20:34:03 +0000 (20:34 -0000)]
Joakim Tjernlund writes:
> Not there yet, but the interfaces are much closer now...
> Heading to bed though, since its 5:30am. :-)
This works, but I discovered something "funny". For all
relocs but COPY you can use scope instead of scope->dyn->symbol_scope
and it is much faster to do that. Search for "Funny" in the patch
to see what I mean. Probably I probably broke something, please let me
know if it works for you too.
I think I am done with ldso now. Has been fun and I hope to
actually use uClibc/busybox soon in a project.
Ohh, there is one thing left, double sized PLT entries, but maybe these
aren't needed in uClibc?
Sweet dreams
Jocke
Eric Andersen [Thu, 29 Jan 2004 12:18:58 +0000 (12:18 -0000)]
Modify interfaces for _dl_parse_relocation_information()
_dl_parse_lazy_relocation_information() and _dl_parse_copy_information()
so they are all consistant, allowing for future consolidation.
Trim some trailing whitespace as well.
Eric Andersen [Thu, 29 Jan 2004 11:42:46 +0000 (11:42 -0000)]
Scrub up use of ELF_USES_RELOCA and eliminte some unsightly ifdefs
Eric Andersen [Thu, 29 Jan 2004 10:48:05 +0000 (10:48 -0000)]
Joakim Tjernlund writes:
Here is the cleaned up laze reloc patch.
Summary:
- Minor cleanup.
- disable the "if (finaladdr <= 0x01fffffc || finaladdr >= 0xfe000000)"
test since it almost never triggered.
- Optimized the lazy relocs handling.
Would be great if you could commit ASAP.
Jocke
Eric Andersen [Thu, 29 Jan 2004 10:44:50 +0000 (10:44 -0000)]
Eliminate separate passes for _dl_copy_fixups() and _dl_fixup(), and
do both operations in a single pass.
Eric Andersen [Thu, 29 Jan 2004 08:59:00 +0000 (08:59 -0000)]
Fixup silly typo
Eric Andersen [Thu, 29 Jan 2004 08:20:11 +0000 (08:20 -0000)]
Patch from Joakim Tjernlund:
Removed R_PPC_NONE and R_PPC_REL24 as these does not seem to be used.
Corrected R_PPC_ADDR32 and R_PPC_JMP_SLOT
Eric Andersen [Tue, 27 Jan 2004 07:37:12 +0000 (07:37 -0000)]
Patch from Joakim Tjernlund to get rid of an annoying warning.
Eric Andersen [Tue, 27 Jan 2004 07:36:19 +0000 (07:36 -0000)]
Joakim Tjernlund writes:
Hi Erik
I have had some fun trying to optimize memcpy, memset and memmove for
PPC. There are only boot tested, but I don't expect any problems :)
Read the comments in powerpc/string.c for more info.
Patch is relative to libc/string
Jocke
Eric Andersen [Sat, 24 Jan 2004 08:40:27 +0000 (08:40 -0000)]
Oleksandr G. Zhadan writes:
Hi Eric,
The attached diff file includes BUS_ISA fix for kernel since 2.4.23/
Kind regards,
Oleks
Eric Andersen [Sat, 24 Jan 2004 08:33:39 +0000 (08:33 -0000)]
Imre Sunyi writes:
Hi Erik
I have corrected a bug in uClibc/libc/inet/resolv.c in function
__dns_lookup(). Have attaced a txt file with my diffs regarding to
uClibc 0.9.26.
If two nameservers are included in /etc/resolv.conf and the first one is
wrong and the secondary is correct the algorithm never
looked up the secondary one. Please review my diff and feel free to
submit the patch onto your CVS.
If reading manual page resolv.conf(5) under nameserver and how the
algorithm should work the previous dns_lookup did not fully followed
that.
Regards
Imre Sunyi
Eric Andersen [Sat, 24 Jan 2004 07:59:30 +0000 (07:59 -0000)]
Joakim Tjernlund writes:
Hi again
I have done some serious clenup of powerpc/elfinterp.c
- Make it look more like glibc.
- Performance modifictions.
- Fixed a few bugs in _dl_do_reloc(). These seem not to have affected
anything, but this how glibc do it.
Jocke
Eric Andersen [Thu, 22 Jan 2004 01:44:25 +0000 (01:44 -0000)]
Some minor debian junk I had sitting in my tree
Eric Andersen [Wed, 21 Jan 2004 23:45:14 +0000 (23:45 -0000)]
Sort all the files
Eric Andersen [Wed, 21 Jan 2004 23:30:52 +0000 (23:30 -0000)]
ignore host binaries
Eric Andersen [Wed, 21 Jan 2004 23:27:48 +0000 (23:27 -0000)]
Split up syscalls.c, since it had grown to be quite large and ugly.
-Erik
Eric Andersen [Wed, 21 Jan 2004 21:06:38 +0000 (21:06 -0000)]
Add poll
Eric Andersen [Wed, 21 Jan 2004 20:27:25 +0000 (20:27 -0000)]
Move poll to its own file, rather than being only half in its own file
Eric Andersen [Wed, 21 Jan 2004 20:14:41 +0000 (20:14 -0000)]
Massive formatting cleanup, making it easier to parse
Eric Andersen [Tue, 20 Jan 2004 21:36:23 +0000 (21:36 -0000)]
Erik is an idiot
Eric Andersen [Tue, 20 Jan 2004 21:28:42 +0000 (21:28 -0000)]
support building the uClibc utils for the host system...
Eric Andersen [Tue, 20 Jan 2004 18:00:16 +0000 (18:00 -0000)]
As noted by Doru Petrescu, there was a spurious line that was using
_dl_debug_addr prior to checking if it was NULL.
Eric Andersen [Tue, 20 Jan 2004 17:44:17 +0000 (17:44 -0000)]
Paul Mundt writes:
The current behavior of the powerpc boot1_arch.h seems somewhat broken.
Currently room is made on the stack pointer for the link register, but the link
register is never actually pushed onto it. glibc bears the following comments:
/* Call _dl_start with one parameter pointing at argc */
mr r3,r1
/* (we have to frob the stack pointer a bit to allow room for
_dl_start to save the link register). */
followed by the -16 add to r1. Despite the fact that r1 is modified, the link
register is never actually pushed onto r1, thus the adjustment is completely
superfluous.
There's two possible fixes for this, either saving the link register in the way
that glibc does, or getting rid of the r1 adjustment. As I'm not sure if saving
the link register will actually break the _dl_boot2 callin, both options will
probably want to be played with.
The following bit of inline assembly in the attached patch builds cleanly for
me with gcc 3.3 on darwin, but I'm not able to test it any further beyond that.
Eric Andersen [Tue, 20 Jan 2004 17:38:25 +0000 (17:38 -0000)]
Joakim Tjernlund writes:
> Is there anything I can do/provide that would assist in the solving of
> this problem on PowerPC? I'm still concerned about my lack of flash space...
Try this path. It fixes the recent ldso problems for me on my mpc860 board.
You should be able to use ldso without the dcbx patch to the kernel now.
Please report back.
Jocke
Manuel Novoa III [Sat, 17 Jan 2004 14:45:55 +0000 (14:45 -0000)]
Add __data_start needed by boehm garbage collector, in turn needed by libgcj.
Manuel Novoa III [Sat, 17 Jan 2004 14:39:40 +0000 (14:39 -0000)]
Prevent runaway asserts, which can happen if there's a problem with
stdio or locales.
Manuel Novoa III [Fri, 16 Jan 2004 18:52:54 +0000 (18:52 -0000)]
We need to link with libgcc.a when creating shared libs, in order to
avoid problems 'hidden symbol' problems. Also handle -lfloat for the
soft-float arm case.
Eric Andersen [Fri, 16 Jan 2004 13:43:30 +0000 (13:43 -0000)]
s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/g
Eric Andersen [Fri, 16 Jan 2004 13:38:10 +0000 (13:38 -0000)]
Fixup selection of endianness, since select does not work on choice
items, we have to declare what endianness cpus are capable of supporting
and work using dependancies.
Eric Andersen [Fri, 16 Jan 2004 12:49:06 +0000 (12:49 -0000)]
Minor updates from linux 2.6.1
Manuel Novoa III [Fri, 16 Jan 2004 00:46:39 +0000 (00:46 -0000)]
Link with libfloat if necessary.
David McCullough [Fri, 16 Jan 2004 00:44:34 +0000 (00:44 -0000)]
Make sure we remove -fomit-frame-pointer from the ldso build. It's
inclusion will cause the loader to crash when jumping to the application.
The reason is due to the START macro having a "leave" instruction included
to fixup the stack before starting the app.
Eric Andersen [Wed, 14 Jan 2004 22:37:55 +0000 (22:37 -0000)]
Include missing errno.h header (as noted by Alan Hourihane).
Fix uninitialized pthread mutex used to lock the list of aligned
memory blocks.
Eric Andersen [Wed, 14 Jan 2004 10:31:58 +0000 (10:31 -0000)]
Use the gcc 3.4 -funit-at-a-time optimization when available
Manuel Novoa III [Wed, 14 Jan 2004 09:14:47 +0000 (09:14 -0000)]
Ok.. we need to link with libgcc.a for some archs. I haven't looked at
all cases, but the archs I've looked at do build the needed routines as
PIC so we should be ok.
Manuel Novoa III [Wed, 14 Jan 2004 06:30:59 +0000 (06:30 -0000)]
Add a dummy (always fails) wcsftime. This is needed for the libstdc++ locale
implementation to build. Later this month I'll add a functional wcsftime.
Manuel Novoa III [Tue, 13 Jan 2004 10:26:56 +0000 (10:26 -0000)]
Add another devfs subdir to the list of checked subdirs.
Eric Andersen [Tue, 13 Jan 2004 05:58:00 +0000 (05:58 -0000)]
Fixup dated comments
Manuel Novoa III [Mon, 12 Jan 2004 11:07:02 +0000 (11:07 -0000)]
Oops... Seems I forgot an else...
Eric Andersen [Fri, 9 Jan 2004 09:13:37 +0000 (09:13 -0000)]
As mjn3 noticed, 64 bit arches should select UCLIBC_HAS_LFS
Eric Andersen [Tue, 6 Jan 2004 01:05:12 +0000 (01:05 -0000)]
Some badly behaved arches fail to provide a PAGE_SIZE define
Eric Andersen [Sun, 4 Jan 2004 09:35:20 +0000 (09:35 -0000)]
Implement res_search and res_querydomain based on netbsd code,
but remove support for host aliases (the HOSTALIASES env variable)
which looks like a very bad idea.
-Erik
Eric Andersen [Sun, 4 Jan 2004 09:32:14 +0000 (09:32 -0000)]
Bump .deb version
Eric Andersen [Sun, 4 Jan 2004 05:49:55 +0000 (05:49 -0000)]
Fix paragraph seperation
Eric Andersen [Sun, 4 Jan 2004 05:46:15 +0000 (05:46 -0000)]
spell 'pthread' properly
Eric Andersen [Sun, 4 Jan 2004 05:34:35 +0000 (05:34 -0000)]
Fix grammar
Eric Andersen [Sun, 4 Jan 2004 05:32:21 +0000 (05:32 -0000)]
Update for release
Manuel Novoa III [Sun, 4 Jan 2004 01:29:01 +0000 (01:29 -0000)]
My mistake. We do need some weak pthread_* funcs. But we were previously
missing one in the glibc abi, and including a number of extras (which I
left in commented).
Unfortunately, this brings back the perl pthread bug. Fixing the incorrect
weaks in libpthread wasn't sufficient to escape the shared loader bug. :-(
Eric Andersen [Sat, 3 Jan 2004 11:17:11 +0000 (11:17 -0000)]
Fix up the news a bit
Eric Andersen [Sat, 3 Jan 2004 11:06:48 +0000 (11:06 -0000)]
Update for release
Eric Andersen [Sat, 3 Jan 2004 10:18:08 +0000 (10:18 -0000)]
Be sure to fully clean 2.6 kernel headers on 'make clean'
Eric Andersen [Sat, 3 Jan 2004 10:10:37 +0000 (10:10 -0000)]
Add ldflags where needed
Eric Andersen [Sat, 3 Jan 2004 08:49:04 +0000 (08:49 -0000)]
And just like that, clone is now fixed.... Previously the
error handling code was mostly broken.
-Erik
Eric Andersen [Sat, 3 Jan 2004 05:54:49 +0000 (05:54 -0000)]
oops
Eric Andersen [Sat, 3 Jan 2004 05:52:34 +0000 (05:52 -0000)]
Minor changes
Eric Andersen [Fri, 2 Jan 2004 23:35:10 +0000 (23:35 -0000)]
A useful/useless little malloc time test
Eric Andersen [Fri, 2 Jan 2004 23:34:13 +0000 (23:34 -0000)]
Peter S. Mazinger writes:
Hello Erik!
I have made some cosmetical changes to the files, removed the added
SCRT=-fPIC option from building the crt0.S file (but it is a requirement
to build them with -fPIC), and changed some comments. I have left the
ldso.c patch with PIE_SUPPORT ifdefs, but consider applying it w/o them
(see some earlier comment from PaX Team on this issue, as it is considered
a bug). To have it work correctly, you'll also need removing
COMPLETELY_PIC.
One thing is missing: PIE_SUPPORT should be usable only for i386 (for
now).
Also added the support for propolice protection (that works for me and
catches memcpy/strcpy attacks (but needs a special gcc version).
Thanks, Peter
Eric Andersen [Fri, 2 Jan 2004 23:24:17 +0000 (23:24 -0000)]
Minor update of the debian packaging stuff
Eric Andersen [Fri, 2 Jan 2004 23:10:37 +0000 (23:10 -0000)]
Remove remnants of the gcc wrapper
Eric Andersen [Fri, 2 Jan 2004 23:07:57 +0000 (23:07 -0000)]
Do not make tests depend on CC, since we no longer build a wrapper.
Eric Andersen [Fri, 2 Jan 2004 12:02:24 +0000 (12:02 -0000)]
Bump version, cleanup whitespace
Eric Andersen [Fri, 2 Jan 2004 11:59:28 +0000 (11:59 -0000)]
Cope with 2.6.x headers
Eric Andersen [Fri, 2 Jan 2004 11:12:16 +0000 (11:12 -0000)]
rohde at soap dot adsl dot dk writes:
The macro to do some floating point checks in libc/sysdeps/linux/powerpc/setjmp.S is incorrect.
The following should fix it.
Same applies to uClibc/libc/sysdeps/linux/powerpc/__longjmp.S
Hope there aren't other files I've missed :)
Eric Andersen [Fri, 2 Jan 2004 10:52:38 +0000 (10:52 -0000)]
rohde at soap dot adsl dot dk writes:
The macro to do some floating point checks in libc/sysdeps/linux/powerpc/setjmp.S is incorrect.
The following should fix it.
Manuel Novoa III [Fri, 2 Jan 2004 09:21:33 +0000 (09:21 -0000)]
Fix __freadable and __fwritable... were using '~' instead of '!'. (ugh)
Fix (hopefully) a potential problem with failed freopen() calls. The
fix isn't tested since I've been working on the replacement stdio
core code which will go in after the next release.
Manuel Novoa III [Fri, 2 Jan 2004 09:20:33 +0000 (09:20 -0000)]
Oops... temporarily support the old stdio code.
Manuel Novoa III [Fri, 2 Jan 2004 08:47:22 +0000 (08:47 -0000)]
The checking Erik added seems to be unnecessary. Without it, I am not
seeing any LTP failures.
Manuel Novoa III [Fri, 2 Jan 2004 08:44:58 +0000 (08:44 -0000)]
Redo the exec functions to comply with SUSv3.
Manuel Novoa III [Fri, 2 Jan 2004 07:11:35 +0000 (07:11 -0000)]
Rewrite popen for SUSv3 compliance.
Added a list of popen()'d to store pids and use waitpid() in pclose().
Loop on waitpid() failure due to EINTR as required.
Close parent's popen()'d FILEs in the {v}fork()'d child.
Fix failure exit code for failed execve().
Manuel Novoa III [Fri, 2 Jan 2004 07:01:13 +0000 (07:01 -0000)]
Minor fix from upstream glibc.
Manuel Novoa III [Fri, 2 Jan 2004 07:00:29 +0000 (07:00 -0000)]
Kept the same approach, but rewrote the code for the most part.
Fixed some minor issues plus (as I recall) one SUSv3 errno case.
Eric Andersen [Wed, 31 Dec 2003 12:13:27 +0000 (12:13 -0000)]
Fir errno return when the file/path is NULL or points to an empty string.
-Erik
Eric Andersen [Wed, 31 Dec 2003 11:50:08 +0000 (11:50 -0000)]
Add extra checks for sigprocmask and rt_sigprocmask syscalls.
The rt_sigprocmask syscall has broken error handling in 2.4.x
kernels, while the sigprocmask syscall appears to get things
right. Regardless we should be extra careful, and add these
checks.
Eric Andersen [Tue, 30 Dec 2003 10:57:16 +0000 (10:57 -0000)]
Fix the manditory typo in my last minute untested fix.
-Erik
Eric Andersen [Tue, 30 Dec 2003 10:45:45 +0000 (10:45 -0000)]
Make sleep behave itself properly inthe presence of SIGCHLD
Eric Andersen [Tue, 30 Dec 2003 10:40:49 +0000 (10:40 -0000)]
Rework malloc. The new default implementation is based on dlmalloc from Doug
Lea. It is about 2x faster than the old malloc-930716, and behave itself much
better -- it will properly release memory back to the system, and it uses a
combination of brk() for small allocations and mmap() for larger allocations.
-Erik
Eric Andersen [Tue, 30 Dec 2003 01:41:14 +0000 (01:41 -0000)]
Update and restore malloc-simple. Slow as molasses, but trivially
simple and releases memory immediately when asked to do so.
-Erik
Eric Andersen [Sun, 28 Dec 2003 08:25:16 +0000 (08:25 -0000)]
Fix a really dumb bug introduced in version 1.4 of this file (a patch for ipv6
support) which could cause things like EOF and read errors while reading
/etc/services to always return a TRY_AGAIN. The perl test suite would alloc a
larger buffer and try again until all memory was exhausted. When we get a read
error, or EOF, it means we didn't get what we wanted, and so we should return
an error. Doing so fixes the failing perl 5.8.2 test.
-Erik