summaryrefslogtreecommitdiff
path: root/lib/libc/arch/hppa
AgeCommit message (Collapse)Author
2022-06-26Decorate the HPPA signal trampoline with the appropriate .cfiskrll
directives to allow exception unwind / backtrace across a signal handler.
2022-06-06Save and restore %r19 the "linkage table pointer register" across the callskrll
to __cerror so if the ptrace syscall fails we can call __cerror again with the correct %r19 value. Do this even though the call of __cerror doesn't go via the PLT because __cerror calls __errno which does. Analysis and fix from Tom Lane in port-hppa/56864: hppa: ptrace(2) dumps core when returning an error I changed the location of where %r19 is stored on the stack to follow the ABI.
2021-10-31Tidy up how __sigaction14_sigtramp.c is added to SRCS.thorpej
2021-10-26Merge all MD __sigaction14_sigtramp.c copies into one:christos
- sparc and sparc64 were not using version 0 sigcontext when there were no arguments in the signal version. This was probably a bug. - vax is using +1 the version numbers of the other archs. - Only hppa was defining __LIBC12_SOURCE__ so it was getting a working sigcontext before. all the other ports that supported sigcontext had the compat code disabled. [pointed out by thorpej, thanks!] If we want to remove sigcontext support from userland at least now there is less work to do so.
2020-10-24Add _UC_GREGS_* defines for all general registersskrll
2020-10-15Remove '_OFFSETOF' prefix for genassm(1) generate CPP identifers forskrll
consistency with other arches. NFCI and libc.so is the same before and after.
2020-05-10Rename curbrk to __curbrk, and make it and __minbrk hiddenskrll
2020-05-09No need to .import __cerror as SYS.h does itskrll
2020-05-05Mark __cerror as hidden to avoid using the PLT. This is required for newskrll
binutils where the PLT stubs now use %t1 (%r22) which is used to pass the errno to __cerror.
2020-05-05Add a space before any non-nullified instruction. NFCI.skrll
2020-05-05Add a space before any non-nullified instruction. NFCI.skrll
2020-05-05Remove unnecesary #define/#undef _LOCOREskrll
2020-05-04Remove unnecesary #define/#undef _LOCOREskrll
2020-05-03Even more trailing whitespaceskrll
2020-05-03Trailing whitespaceskrll
2020-04-18Rename "syscall" to "_syscall" and provide "syscall" as a weak alias.thorpej
2018-11-08Try speling it rite, riasthradhdadhaa or whatever your name is.riastradh
2018-11-07On ports without __HAVE_LONG_DOUBLE, make fabsl alias fabs.riastradh
For some reason, fabs lives in libc, not in libm, and our tests now detect when fabs or fabsl is missing from libm. For those ports that sometimes have long double and sometimes don't, make it conditional. Still missing: fabs _and_ fabsl on ia64. Need help from an itanium wizard! Other portmasters: Please take a look and see if I missed any ports that might have long double where this alias will not work.
2017-02-07Mark exect(3) obsolete and bind it to plain execve(2) on all platformskamil
The original exect(2) from BSD4.2 was enabling bit for tracing (single-step mode) and calling execve(2). The purpose of it was to generate a signal for a tracer once the application will change its image to a new program. This approach no longer works as: - exect(2) traces (single-steps) libc and it requires hundreds or thousands steps before entering a new image - it's vax and x86 specific code - this functionality has been moved to the kernel - once a process is traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to its debugger - the side effects and unportability make this interface unusable - there are no known users of this interface - it apparently never worked better since day0 of NetBSD ("day0 bug") Users are requested to move to other execve(2) variants. Calling current execve(2) as it is the most similar behavior to this one from BSD4.2. Discussed several times on mailing lists and in PR/51700. Add warning to exect(3) telling about marking this function obsolete. This function is prepared to be removed in next libc major bump. Sponsored by <The NetBSD Foundation>
2016-07-16No need to define PSW_MBS as machine/psl.h provides it for usskrll
2016-01-25use __register_tchristos
2014-03-06Move to a flat space register convention. %sr[4-7] are all now the spaceskrll
number allocated to the process. gcc produces (slightly) better code with this convention. Retain backwards compatiblity. Welcome to 6.99.36
2014-02-19Provide a genassym.cf in libc for hppa and use it.skrll
2013-09-12Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is smalljoerg
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-08-24Whitespace.skrll
2012-09-12setcontext() used to be incompatible with -lpthread since it affectedmanu
the TLS pointer, therefore wrecking the pthread environement. Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha) that controlled whether setcontext() would change the TLS pointer. This change let libpthread override setcontext() with its own version that unsets _UC_TLSBASE, enabling safe usage of setcontext() with -lpthread. We also have the following required changes here: - rename alpha's _UC_UNIQUE into _UC_TLSBASE - add _UC_TLSBASE definition in header file for all ports (powerpc, sh3, sparc and sparc64 lack the implementation for now) - introduce a libc stub that can be overriden for setcontext() - modify MD libcs swapcontext() implementations so that they use the setcontext() libc stub instead of doing a plain system call. While we are there: - document various MD _UC_* flags in header file - add libc and libpthread tests for swapcontext() behavior (hopefully helpful to spot MD problems introduced with this change) Future work: - Deciding whether kernel support or _UC_TLSBASE should be added for powerpc, sh3, sparc and sparc64 is left to portmasters sparc64 Approved by core@
2012-03-23Shut lint up.skrll
From he@
2012-03-22Shut lint up about dp.skrll
From he@
2012-03-14Use the _end symbol rather than the end symbol. Prevents version infoskrll
problems in elflink.c for the heimdal libraries.
2011-09-20Explicitly add back __resumecontext wrapperjoerg
2011-09-19Mark _resumecontext as dead. ANSIfy all declarations for it.joerg
2011-02-24Allow storing and receiving the LWP private pointer via ucontext_tjoerg
on all platforms except VAX and IA64. Add fast access via register for AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace the stack based pthread_self(). Implement skeleton support for Alpha, HPPA, PowerPC, SPARC and SPARC64, but leave it disabled. Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in machine/types.h and a corresponding __lwp_getprivate_fast in machine/mcontext.h. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger.
2010-01-07Deal with PLABELs in _lwp_makecontextskrll
2009-11-03Follow upstream license changes for files with Michael Shalayeff'ssnj
copyright. In most cases, this means dropping the 3rd and 4th clauses.
2009-10-21G/C bcopy.m4 and references to it.skrll
2009-07-31Add the 'abs', 'div' and 'erand48' sources to stdlib/Makefile.inc.dsl
Change the arch files only include the .S files. This adds imaxdiv() to some archs where it was missing.
2009-07-30If SRCS contains any .S files then remove the corresponding .c file fromdsl
SRCS and add to LSRCS (for lint). Change the 'string' Makefiles so that the arch/*/string/Makefile.inc need only specify the .S files for that architecture and not the .c files for all the files they don't override.
2009-07-18Remove references to index.c and rindex.c (strchr.c and strrchr.cdsl
now provide the definitions).
2009-02-22Make NAN a compile time constant (with help from the compiler). Suggestedmartin
by krister. Fixes PR 40695. Make references to the old construct (which we can't remove for binary compatibility reasons) emit a linker warning.
2009-01-25Sprinkle the "memory" clobber register so the fpsr manipulation actuallyskrll
happens. Fixes the ieeefp/except regresion test.
2008-10-26define and use LIBCDIR in terms of .CURDIR. fixes compat/lib/libc build.mrg
2008-08-04Add C99 functions imaxabs and imaxdiv.matt
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2007-12-22Add a comment explaining stack layout and register contents.skrll
2007-12-02Implement ptrace.skrll
2007-12-02Fix include files and change use LEAF_ENTRY_NOPROFILE function to fixskrll
the unwind entry.
2007-11-18Remove unused include.skrll
Fix unwind info with S/ENTRY/LEAF_&/
2007-11-18Generate correct unwind info for syscall stubs by using LEAF_ENTRY insteadskrll
of ENTRY(foo,0) so that gdb can backtrace through the stubs.
2007-10-28Set up the tail of the instruction address queue so thatskrll
we don't have to rely on luck for swapcontext(3) to work. This fixes a problem pointed out to me by Chuck Silvers.
2006-12-08Sync all resumecontext.c versions with the changes originally mademartin
by Matthias Drochner to i386 and alpha: -check for a NULL uc_link before calling setcontext(2); do a real exit(3) instead with exit handlers and all that -If setcontext(2) returns (which it shouldn't), do an _exit(-1) rather than relying on a sensible return value to use as exit code. Makes it less likely that an ucontext corruption goes unnoticed.