summaryrefslogtreecommitdiff
path: root/ldso/ldso/sparc/dl-syscalls.h
AgeCommit message (Collapse)Author
2011-10-06ldso: merge duplicate dl-syscalls.h code to common headerMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2006-01-19update syscall macros so both ldso and libc can use themMike Frysinger
2006-01-19move a bunch of arch-specific checks out of common files and into an arch ↵Mike Frysinger
specific header file to make porting/updates a lot easier
2006-01-11need to include bits/sysnum.h for all of our __NR_* defsMike Frysinger
2005-08-15move arch-specific checks out of shared dl-syscall.h and into arch-specific ↵Mike Frysinger
dl-syscalls.h
2005-03-16cleanup & standardizeMike Frysinger
2004-06-12Jakub Bogusz from pld-linux dot org writes:Eric Andersen
Hello, I managed to get ldso (and thus shared linking to uClibc) to work on sparc (actually sparc64 kernel with 32-bit userspace), at least on simple "hello world" program (more complex ones not tested). Some notes on attached patch (against 0.9.26, would require some work to apply on current CVS - but I tested 0.9.26, not CVS): - ELF magic cannot be examined by _dl_strncmp so early, probably because of string constant, like on ppc/mips/sh (note that early SEND_STDERR still crashes when trying to do _dl_strlen - I suppose that string constants require relocation; but adding load_addr didn't help, just ELF header was displayed instead of crash) - mmap() is syscall6 like on ppc/mips/sh, not old i386 mmap() - for generic sparc (i.e. not sparcv8/sparcv9) gcc produces .udiv/.urem calls for unsigned integer / and % operators - so these operations must be avoided. I copied do_rem definition from arm header. But / and % are used also in _dl_simple_ltoa() and _dl_simple_ltoahex(); in ltoahex gcc optimizes it to shifts (but I think it's safer to use shifts explicitly, not rely on optimization...). I changed % in ltoa to do_rem, but as there was no do_div definition, I changed all "%d" specifiers to "%x" to avoid crashes (this changes wouldn't be needed if _dl_simple_ltoa() were fixed to not use division on sparc). - "#define SOLARIS_COMPATIBLE" in ld_sysdep.h broke ldso on Linux because of redefining _dl_linux_resolve only in some places (it was still referenced in INIT_GOT before redefinition). So _dl_linux_resolve redefinition should be moved before INIT_GOT definition or removed. - sparc64 kernel requires mmap() addresses to be aligned to 8192, not 4096, otherwise mmap() call failed - reloc_entry must be shifted by 10, not 12 (I found similar operation in glibc sources) Aside of sparc-specific fixes: - I moved some _dl_dprintf()s inside if(_dl_debug_*) conditions (to avoid debugging messages when LD_DEBUG is not defined) - it seems that there was possible off-by-one in ltoa and ltoahex? they are called with char[22] as 1st argument, and then '\0' is stored in local[22] (_before_ p decrementation)... or am I missing something? If not, fix is included in patch.
2004-05-12Add a local '_dl_errno' to be used by syscalls in ldso, allowingEric Andersen
useful syscall failure diagnostics.
2004-02-01Jakub Bogusz writes:Eric Andersen
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.
2002-03-19Cleanup header files a bit.Eric Andersen
-Erik
2001-06-27Cleanup to not use kernel headers at all.Eric Andersen
-Erik
2001-05-01Yet another major rework. This time around, rework it to no longerEric Andersen
use linux kernel header files. -Erik
2001-04-27I messed up the commentEric Andersen
2001-04-27Yet another large update to ld.so. In this iteration I finally gotEric Andersen
the C based syscalls working, which greatly simplifies what it takes to get new architectures running. -Erik