Age | Commit message (Collapse) | Author |
|
|
|
mips mostly working. From there, I tracked the bash failure to a
bad _dl_atexit address and Erik took it from there.
|
|
|
|
|
|
This patch adds code to uClibc to support a new ABI designed for the
FR-V architecture, that enables text segments of executables and
shared libraries to be shared by multiple processes on an OS such as
uClinux, that can run on FR-V processors without an MMU.
Patches for binutils and GCC have just been posted in the
corresponding mailing lists. The binutils patch was approved,
but there's one additional patch pending review, that I posted
this week. An updated GCC patch will be posted to
gcc-patches@gcc.gnu.org as soon as I complete testing (I used a
known-good compiler to test the uClibc patch below).
Since the existing dynamic loader code didn't support independent
relocation of segments, it required changes that were somewhat
extensive. I've added a number of new machine-specific macros to try
to keep the platform and ABI-specific details outside the generic
code. I hope this is not a problem.
|
|
|
|
Begin converting some big ugly macros to inline functions
instead
|
|
hacks. Just check for the elf magic string one byte at a time....
|
|
sensible -1 fd, rather than pretending to work off of fd 0, which makes
absolutely no sense.
|
|
|
|
|
|
since gdb can't do anything for us.
|
|
Also, if you are to enable SUPPORT_LD_DEBUG on MIPS, I think this
patch is needed too.
|
|
|
|
|
|
Hi it is me again.
This is the latest ldso patch. the NEW weak symbol handling works now
with a little special handling in _dl_find_hash(). You get to chose
if you want the new or old handling :)
There was 2 missing _dl_check_if_named_library_is_loaded() calls in _dlopen().
I then disabled the _dl_check_if_named_library_is_loaded() in dl-elf.c since
it is rendundant.
Question, why does some _dl_linux_resolver(), like i386, have 2 calls
to _dl_find_hash()? I think that is wrong, isn't it?
I really hope you can check this out soon ...
|
|
problem with mips -- contrary to my expectation gcc on mips _always_ defines
__PIC__ which breaks the assumption inherent in my code. This should fix
things up.
|
|
|
|
|
|
|
|
|
|
till I properly finish the next step in my evil plan.
|
|
location for this stuff
|
|
|
|
|
|
|
|
to be arch specific to work properly.
|
|
Hi again
All dltest* and test* programs pass for me.
uClibc ld.so resolves according to the OLD weak symbol handling.
I have tried to use the new scheme as well, but that segfaults in all
cases but test3.
|
|
|
|
to make it easier to treat it specially while not bothering the
rest of the code with the same constraints.
|
|
|
|
|
|
|
|
|
|
|
|
-Erik
|
|
|
|
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.
|
|
I still don't have a good handle on why and when the different
scope values should be used.
|
|
> 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
|
|
_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.
|
|
|
|
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
|
|
do both operations in a single pass.
|
|
|
|
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
|
|
|
|
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
|
|
_dl_debug_addr prior to checking if it was NULL.
|
|
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.
|