klibc-bot for Ben Hutchings
2024-Oct-01 22:36 UTC
[klibc] [klibc:master] Delete the ia64 port
Commit-ID: 7ee81a9715e3f3aea361eb08c27f32aa1f172e26 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=7ee81a9715e3f3aea361eb08c27f32aa1f172e26 Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Mon, 19 Aug 2024 23:34:30 +0200 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Mon, 19 Aug 2024 23:34:30 +0200 [klibc] Delete the ia64 port The Linux ia64 port was finally deleted in v6.7, so there's no point in maintaining support in klibc. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/include/arch/ia64/klibc/archconfig.h | 20 -- usr/include/arch/ia64/klibc/archsetjmp.h | 17 -- usr/include/arch/ia64/klibc/archsignal.h | 32 --- usr/include/sched.h | 12 +- usr/klibc/README.klibc | 1 - usr/klibc/SYSCALLS.def | 18 +- usr/klibc/arch/ia64/Kbuild | 13 -- usr/klibc/arch/ia64/MCONFIG | 17 -- usr/klibc/arch/ia64/crt0.S | 23 --- usr/klibc/arch/ia64/klibc.ld | 267 ------------------------ usr/klibc/arch/ia64/pipe.S | 27 --- usr/klibc/arch/ia64/setjmp.S | 343 ------------------------------- usr/klibc/arch/ia64/sigaction.c | 64 ------ usr/klibc/arch/ia64/syscall.S | 18 -- usr/klibc/arch/ia64/sysstub.ph | 29 --- usr/klibc/arch/ia64/vfork.S | 37 ---- usr/klibc/getpriority.c | 2 +- 17 files changed, 10 insertions(+), 930 deletions(-) diff --git a/usr/include/arch/ia64/klibc/archconfig.h b/usr/include/arch/ia64/klibc/archconfig.h deleted file mode 100644 index 9bf3c071..00000000 --- a/usr/include/arch/ia64/klibc/archconfig.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * include/arch/ia64/klibc/archconfig.h - * - * See include/klibc/sysconfig.h for the options that can be set in - * this file. - * - */ - -#ifndef _KLIBC_ARCHCONFIG_H -#define _KLIBC_ARCHCONFIG_H - -/* IA64 doesn't have sys_fork, but it does have an MMU */ -#define _KLIBC_NO_MMU 0 -/* IA64 doesn't have sys_vfork, it has architecture-specific code */ -#define _KLIBC_REAL_VFORK 1 -/* Need to fix-up function pointers to function descriptor pointers - * in struct sigaction */ -#define _KLIBC_NEEDS_SIGACTION_FIXUP 1 - -#endif /* _KLIBC_ARCHCONFIG_H */ diff --git a/usr/include/arch/ia64/klibc/archsetjmp.h b/usr/include/arch/ia64/klibc/archsetjmp.h deleted file mode 100644 index 43564ee5..00000000 --- a/usr/include/arch/ia64/klibc/archsetjmp.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * arch/ia64/include/klibc/archsetjmp.h - * - * Code borrowed from the FreeBSD kernel. - * - */ - -#ifndef _KLIBC_ARCHSETJMP_H -#define _KLIBC_ARCHSETJMP_H - -/* User code must not depend on the internal representation of jmp_buf. */ -#define _JBLEN 0x200 - -/* guaranteed 128-bit alignment! */ -typedef char jmp_buf[_JBLEN] __attribute__ ((aligned(16))); - -#endif diff --git a/usr/include/arch/ia64/klibc/archsignal.h b/usr/include/arch/ia64/klibc/archsignal.h deleted file mode 100644 index 7cfbf308..00000000 --- a/usr/include/arch/ia64/klibc/archsignal.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * arch/ia64/include/klibc/archsignal.h - * - * Architecture-specific signal definitions. - * - */ - -#ifndef _KLIBC_ARCHSIGNAL_H -#define _KLIBC_ARCHSIGNAL_H - -#include <asm/signal.h> -#define _NSIG 64 -#define _NSIG_BPW 64 -#define _NSIG_WORDS (_NSIG / _NSIG_BPW) - -typedef struct { - unsigned long sig[_NSIG_WORDS]; -} sigset_t; - -struct sigaction { - union { - __sighandler_t _sa_handler; - void (*_sa_sigaction) (int, struct siginfo *, void *); - } _u; - unsigned long sa_flags; - sigset_t sa_mask; -}; - -#define sa_handler _u._sa_handler -#define sa_sigaction _u._sa_sigaction - -#endif diff --git a/usr/include/sched.h b/usr/include/sched.h index 6874855a..54447a43 100644 --- a/usr/include/sched.h +++ b/usr/include/sched.h @@ -23,17 +23,7 @@ __extern int sched_setaffinity(pid_t, unsigned int, unsigned long *); __extern int sched_getaffinity(pid_t, unsigned int, unsigned long *); __extern int sched_yield(void); -/* Raw interfaces to clone(2); only actually usable for non-VM-cloning */ -#ifdef __ia64__ -__extern pid_t __clone2(int, void *, void *); -static __inline__ pid_t __clone(int _f, void *_sp) -{ - /* If this is used with _sp != 0 it will have the effect of the sp - and rsp growing away from a single point in opposite directions. */ - return __clone2(_f, _sp, _sp); -} -#else +/* Raw interface to clone(2); only actually usable for non-VM-cloning */ __extern pid_t __clone(int, void *); -#endif #endif /* _SCHED_H */ diff --git a/usr/klibc/README.klibc b/usr/klibc/README.klibc index 1a9e09fe..33c87b42 100644 --- a/usr/klibc/README.klibc +++ b/usr/klibc/README.klibc @@ -108,7 +108,6 @@ The following is the last known status of various architectures: arm64: Working h8300: Not yet ported i386: Working - ia64: Working m68k: Working mips: Working mips64: Working diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index 9b6b1127..7fd8164c 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -18,10 +18,9 @@ * Process-related syscalls */ void _exit,exit::_exit(int); -<?!ia64> pid_t clone::__clone(unsigned long, void *); -<?ia64> pid_t clone::__clone2(unsigned long, void *, void *); +<?> pid_t clone::__clone(unsigned long, void *); # if ! _KLIBC_NO_MMU -<!sparc,sparc64,ia64,arm64,riscv64,loongarch64> pid_t fork(); +<!sparc,sparc64,arm64,riscv64,loongarch64> pid_t fork(); <sparc,sparc64> pid_t fork at forkish(); #endif #if _KLIBC_REAL_VFORK @@ -44,8 +43,8 @@ pid_t getsid(pid_t); pid_t wait4(pid_t, int *, int, struct rusage *); int execve(const char *, char * const *, char * const *); <?> int nice(int); -<alpha,ia64> int getpriority(int, int); -<!alpha,ia64> int getpriority::__getpriority(int, int); +<alpha> int getpriority(int, int); +<!alpha> int getpriority::__getpriority(int, int); int setpriority(int, int, int); int getrusage(int, struct rusage *); int sched_setscheduler(pid_t, int, const struct sched_param *); @@ -86,8 +85,8 @@ int capset(cap_user_header_t, cap_user_data_t); * Filesystem-related system calls */ int mount(const char *, const char *, const char *, unsigned long, const void *); -<!alpha,ia64> int umount2(const char *, int); -<alpha,ia64> int umount::umount2(const char *, int); +<!alpha> int umount2(const char *, int); +<alpha> int umount::umount2(const char *, int); <?> int pivot_root(const char *, const char *); int sync(); #ifdef __NR_statfs64 @@ -125,7 +124,7 @@ int fchmod(int, mode_t); <?> int mkdir(const char *, mode_t); <?> int mkdirat(int, const char *, mode_t); <?> int rmdir(const char *); -<?!alpha,ia64,mips,mips64,sh,sparc,sparc64> int pipe(int *); +<?!alpha,mips,mips64,sh,sparc,sparc64> int pipe(int *); int pipe2(int *, int); mode_t umask(mode_t); int chroot(const char *); @@ -188,10 +187,9 @@ ssize_t sendfile64,sendfile::sendfile(int, int, off_t *, size_t, off_t); /* * Signal operations */ -<!sparc,sparc64,alpha,ia64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t); +<!sparc,sparc64,alpha> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t); <sparc,sparc64> int rt_sigaction::____rt_sigaction(int, const struct sigaction *, struct sigaction *, void *, size_t); <alpha> int rt_sigaction::____rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t, void *); -<ia64> int rt_sigaction::____rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t); int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t); int rt_sigpending::__rt_sigpending(sigset_t *, size_t); int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t); diff --git a/usr/klibc/arch/ia64/Kbuild b/usr/klibc/arch/ia64/Kbuild deleted file mode 100644 index 41b8ca06..00000000 --- a/usr/klibc/arch/ia64/Kbuild +++ /dev/null @@ -1,13 +0,0 @@ -# -# klibc files for ia64 -# - -klib-y := vfork.o setjmp.o sigaction.o pipe.o syscall.o - -klib-y += ../../libgcc/__divdi3.o ../../libgcc/__divsi3.o -klib-y += ../../libgcc/__udivdi3.o ../../libgcc/__udivsi3.o -klib-y += ../../libgcc/__umodsi3.o ../../libgcc/__umoddi3.o -klib-y += ../../libgcc/__udivmodsi4.o ../../libgcc/__udivmoddi4.o - -always := crt0.o -targets := crt0.o diff --git a/usr/klibc/arch/ia64/MCONFIG b/usr/klibc/arch/ia64/MCONFIG deleted file mode 100644 index db6a4cee..00000000 --- a/usr/klibc/arch/ia64/MCONFIG +++ /dev/null @@ -1,17 +0,0 @@ -# -*- makefile -*- -# -# arch/ia64/MCONFIG -# -# Special rules for this architecture. Note that this is actually -# included from the main Makefile, and that pathnames should be -# accordingly. -# - -KLIBCARCHREQFLAGS = -mno-pic -KLIBCOPTFLAGS += -Os -KLIBCBITSIZE = 64 - -KLIBCSHAREDFLAGS = -T $(srctree)/$(src)/arch/$(KLIBCARCH)/klibc.ld - -# Kernel has never used stack trampolines -KLIBCEXECSTACK := n diff --git a/usr/klibc/arch/ia64/crt0.S b/usr/klibc/arch/ia64/crt0.S deleted file mode 100644 index 2394cc42..00000000 --- a/usr/klibc/arch/ia64/crt0.S +++ /dev/null @@ -1,23 +0,0 @@ - -#include <asm/fpu.h> - - .align 32 - .global _start - - .proc _start - .type _start, at function -_start: - .prologue - .save rp, r0 - - alloc r2 = ar.pfs,0,0,2,0 - movl r3 = FPSR_DEFAULT - ;; - adds out0= 16,sp /* argc pointer */ - - .body - br.call.sptk.few rp = __libc_init - ;; - break 0 /* break miserably if we ever return */ - - .endp _start diff --git a/usr/klibc/arch/ia64/klibc.ld b/usr/klibc/arch/ia64/klibc.ld deleted file mode 100644 index d203d0ae..00000000 --- a/usr/klibc/arch/ia64/klibc.ld +++ /dev/null @@ -1,267 +0,0 @@ -/* Linker script for klibc.so. Whilst we can control text-segment for klibc.so - to not collide, the data segment is not controllable and hard-coded to start - at 0x6000000000000000 for position-dependent outputs, rather than simply - following on from the text segment like position-independent output or other - architectures. */ -/* Copyright (C) 2014-2018 Free Software Foundation, Inc. - Copying and distribution of this script, with or without modification, - are permitted in any medium without royalty provided the copyright - notice and this notice are preserved. */ -ENTRY(_start) -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - /* Dynamic linker is normally placed in the 0x20..0 segment along with any - mmap'ed shared libraries. */ - . = SEGMENT_START("text-segment", 0x2000000000000000) + SIZEOF_HEADERS; - .interp : { *(.interp) } - .note.gnu.build-id : { *(.note.gnu.build-id) } - .hash : { *(.hash) } - .gnu.hash : { *(.gnu.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.dyn : - { - *(.rel.init) - *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) - *(.rel.fini) - *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) - *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) - *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) - *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) - *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) - *(.rel.ctors) - *(.rel.dtors) - *(.rel.got) - *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) - *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) - *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) - *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) - *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) - PROVIDE_HIDDEN (__rel_iplt_start = .); - *(.rel.iplt) - PROVIDE_HIDDEN (__rel_iplt_end = .); - } - .rela.dyn : - { - *(.rela.init) - *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) - *(.rela.fini) - *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) - *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) - *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) - *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) - *(.rela.ctors) - *(.rela.dtors) - *(.rela.got) - *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) - *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) - *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) - *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) - *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) - PROVIDE_HIDDEN (__rela_iplt_start = .); - *(.rela.iplt) - PROVIDE_HIDDEN (__rela_iplt_end = .); - } - .rel.plt : - { - *(.rel.plt) - } - .rela.plt : - { - *(.rela.plt) - } - .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } - .init : - { - KEEP (*(SORT_NONE(.init))) - } =0x00300000010070000002000001000400 - .plt : { *(.plt) } - .iplt : { *(.iplt) } - .text : - { - *(.text.unlikely .text.*_unlikely .text.unlikely.*) - *(.text.exit .text.exit.*) - *(.text.startup .text.startup.*) - *(.text.hot .text.hot.*) - *(.text .stub .text.* .gnu.linkonce.t.*) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } =0x00300000010070000002000001000400 - .fini : - { - KEEP (*(SORT_NONE(.fini))) - } =0x00300000010070000002000001000400 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - .sdata2 : - { - *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) - } - .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } - .opd : { *(.opd) } - .IA_64.unwind_info : { KEEP(*(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*)) } - .IA_64.unwind : { KEEP(*(.IA_64.unwind* .gnu.linkonce.ia64unw.*)) } - .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } - .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table - .gcc_except_table.*) } - .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } - /* These sections are generated by the Sun/Oracle C++ compiler. */ - .exception_ranges : ONLY_IF_RO { *(.exception_ranges - .exception_ranges*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); - /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } - .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } - .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } - .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } - /* Thread Local Storage sections */ - .tdata : - { - PROVIDE_HIDDEN (__tdata_start = .); - *(.tdata .tdata.* .gnu.linkonce.td.*) - } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) - PROVIDE_HIDDEN (__init_array_end = .); - } - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) - PROVIDE_HIDDEN (__fini_array_end = .); - } - .jcr : { KEEP (*(.jcr)) } - .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) } - .dynamic : { *(.dynamic) } - .data : - { - *(.data .data.* .gnu.linkonce.d.*) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - KEEP (*crtbegin?.o(.ctors)) - /* We don't want to include the .ctor section from - the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin.o(.dtors)) - KEEP (*crtbegin?.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } - .IA_64.pltoff : { *(.IA_64.pltoff) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : - { - *(.sdata .sdata.* .gnu.linkonce.s.*) - } - _edata = .; PROVIDE (edata = .); - . = .; - __bss_start = .; - .sbss : - { - *(.dynsbss) - *(.sbss .sbss.* .gnu.linkonce.sb.*) - *(.scommon) - } - .bss : - { - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. - FIXME: Why do we need it? When there is no .bss section, we don't - pad the .data section. */ - . = ALIGN(. != 0 ? 64 / 8 : 1); - } - . = ALIGN(64 / 8); - . = SEGMENT_START("ldata-segment", .); - . = ALIGN(64 / 8); - _end = .; PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* DWARF 3 */ - .debug_pubtypes 0 : { *(.debug_pubtypes) } - .debug_ranges 0 : { *(.debug_ranges) } - /* DWARF Extension. */ - .debug_macro 0 : { *(.debug_macro) } - .debug_addr 0 : { *(.debug_addr) } - .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } -} diff --git a/usr/klibc/arch/ia64/pipe.S b/usr/klibc/arch/ia64/pipe.S deleted file mode 100644 index ae31a3a1..00000000 --- a/usr/klibc/arch/ia64/pipe.S +++ /dev/null @@ -1,27 +0,0 @@ -#include <asm/unistd.h> - .align 32 - .proc pipe - .global pipe -pipe: - alloc r16 = ar.pfs, 1, 0, 8, 0 - mov r33 = r32 - mov r15=__NR_pipe - ;; - break 0x100000 // Do the syscall - ;; - - cmp.ne p6, p7 = -1, r10 - mov r15 = r0 - ;; -(p6) st4 [r32] = r8, 4 - -(p7) movl r14 = errno -(p7) addl r15 = -1, r0 - ;; -(p6) st4 [r32] = r9 - -(p7) st4 [r14] = r8 - - mov r8 = r15 - br.ret.sptk.many b0 - .endp pipe diff --git a/usr/klibc/arch/ia64/setjmp.S b/usr/klibc/arch/ia64/setjmp.S deleted file mode 100644 index ab1cea2c..00000000 --- a/usr/klibc/arch/ia64/setjmp.S +++ /dev/null @@ -1,343 +0,0 @@ -/* - * IA-64 specific setjmp/longjmp routines - * - * Inspired by setjmp.s from the FreeBSD kernel. - */ - -#define J_UNAT 0 -#define J_NATS 0x8 -#define J_PFS 0x10 -#define J_BSP 0x18 -#define J_RNAT 0x20 -#define J_PREDS 0x28 -#define J_LC 0x30 -#define J_R4 0x38 -#define J_R5 0x40 -#define J_R6 0x48 -#define J_R7 0x50 -#define J_SP 0x58 -#define J_F2 0x60 -#define J_F3 0x70 -#define J_F4 0x80 -#define J_F5 0x90 -#define J_F16 0xa0 -#define J_F17 0xb0 -#define J_F18 0xc0 -#define J_F19 0xd0 -#define J_F20 0xe0 -#define J_F21 0xf0 -#define J_F22 0x100 -#define J_F23 0x110 -#define J_F24 0x120 -#define J_F25 0x130 -#define J_F26 0x140 -#define J_F27 0x150 -#define J_F28 0x160 -#define J_F29 0x170 -#define J_F30 0x180 -#define J_F31 0x190 -#define J_FPSR 0x1a0 -#define J_B0 0x1a8 -#define J_B1 0x1b0 -#define J_B2 0x1b8 -#define J_B3 0x1c0 -#define J_B4 0x1c8 -#define J_B5 0x1d0 -#define J_SIGMASK 0x1d8 -#define J_SIGSET 0x1e0 -#define J_GP 0x1f0 - -// int setjmp(struct jmp_buffer *) -// -// Setup a non-local goto. -// -// Description: -// -// SetJump stores the current register set in the area pointed to -// by "save". It returns zero. Subsequent calls to "LongJump" will -// restore the registers and return non-zero to the same location. -// -// On entry, r32 contains the pointer to the jmp_buffer -// - .align 32 - .global setjmp - .proc setjmp -setjmp: - // - // Make sure buffer is aligned at 16byte boundary - // - add r10 = -0x10,r0 ;; // mask the lower 4 bits - and r32 = r32, r10;; - add r32 = 0x10, r32;; // move to next 16 byte boundary - - add r10 = J_PREDS, r32 // skip Unats & pfs save area - add r11 = J_BSP, r32 - // - // save immediate context - // - mov r2 = ar.bsp // save backing store pointer - mov r3 = pr // save predicates - flushrs - ;; - // - // save user Unat register - // - mov r16 = ar.lc // save loop count register - mov r14 = ar.unat // save user Unat register - - st8 [r10] = r3, J_LC-J_PREDS - st8 [r11] = r2, J_R4-J_BSP - ;; - st8 [r10] = r16, J_R5-J_LC - st8 [r32] = r14, J_NATS // Note: Unat at the - // beginning of the save area - mov r15 = ar.pfs - ;; - // - // save preserved general registers & NaT's - // - st8.spill [r11] = r4, J_R6-J_R4 - ;; - st8.spill [r10] = r5, J_R7-J_R5 - ;; - st8.spill [r11] = r6, J_SP-J_R6 - ;; - st8.spill [r10] = r7, J_F3-J_R7 - ;; - st8.spill [r11] = sp, J_F2-J_SP - ;; - // - // save spilled Unat and pfs registers - // - mov r2 = ar.unat // save Unat register after spill - ;; - st8 [r32] = r2, J_PFS-J_NATS // save unat for spilled regs - ;; - st8 [r32] = r15 // save pfs - // - // save floating registers - // - stf.spill [r11] = f2, J_F4-J_F2 - stf.spill [r10] = f3, J_F5-J_F3 - ;; - stf.spill [r11] = f4, J_F16-J_F4 - stf.spill [r10] = f5, J_F17-J_F5 - ;; - stf.spill [r11] = f16, J_F18-J_F16 - stf.spill [r10] = f17, J_F19-J_F17 - ;; - stf.spill [r11] = f18, J_F20-J_F18 - stf.spill [r10] = f19, J_F21-J_F19 - ;; - stf.spill [r11] = f20, J_F22-J_F20 - stf.spill [r10] = f21, J_F23-J_F21 - ;; - stf.spill [r11] = f22, J_F24-J_F22 - stf.spill [r10] = f23, J_F25-J_F23 - ;; - stf.spill [r11] = f24, J_F26-J_F24 - stf.spill [r10] = f25, J_F27-J_F25 - ;; - stf.spill [r11] = f26, J_F28-J_F26 - stf.spill [r10] = f27, J_F29-J_F27 - ;; - stf.spill [r11] = f28, J_F30-J_F28 - stf.spill [r10] = f29, J_F31-J_F29 - ;; - stf.spill [r11] = f30, J_FPSR-J_F30 - stf.spill [r10] = f31, J_B0-J_F31 // size of f31 + fpsr - // - // save FPSR register & branch registers - // - mov r2 = ar.fpsr // save fpsr register - mov r3 = b0 - ;; - st8 [r11] = r2, J_B1-J_FPSR - st8 [r10] = r3, J_B2-J_B0 - mov r2 = b1 - mov r3 = b2 - ;; - st8 [r11] = r2, J_B3-J_B1 - st8 [r10] = r3, J_B4-J_B2 - mov r2 = b3 - mov r3 = b4 - ;; - st8 [r11] = r2, J_B5-J_B3 - st8 [r10] = r3 - mov r2 = b5 - ;; - st8 [r11] = r2 - ;; - // - // return - // - mov r8 = r0 // return 0 from setjmp - mov ar.unat = r14 // restore unat - br.ret.sptk b0 - .endp setjmp - -// -// void longjmp(struct jmp_buffer *, int val) -// -// Perform a non-local goto. -// -// Description: -// -// LongJump initializes the register set to the values saved by a -// previous 'SetJump' and jumps to the return location saved by that -// 'SetJump'. This has the effect of unwinding the stack and returning -// for a second time to the 'SetJump'. -// - - .align 32 - .global longjmp - .proc longjmp -longjmp: - // - // Make sure buffer is aligned at 16byte boundary - // - add r10 = -0x10,r0 ;; // mask the lower 4 bits - and r32 = r32, r10;; - add r32 = 0x10, r32;; // move to next 16 byte boundary - - // - // caching the return value as we do invala in the end - // - mov r8 = r33 // return value - - // - // get immediate context - // - mov r14 = ar.rsc // get user RSC conf - add r10 = J_PFS, r32 // get address of pfs - add r11 = J_NATS, r32 - ;; - ld8 r15 = [r10], J_BSP-J_PFS // get pfs - ld8 r2 = [r11], J_LC-J_NATS // get unat for spilled regs - ;; - mov ar.unat = r2 - ;; - ld8 r16 = [r10], J_PREDS-J_BSP // get backing store pointer - mov ar.rsc = r0 // put RSE in enforced lazy - mov ar.pfs = r15 - ;; - - // - // while returning from longjmp the BSPSTORE and BSP needs to be - // same and discard all the registers allocated after we did - // setjmp. Also, we need to generate the RNAT register since we - // did not flushed the RSE on setjmp. - // - mov r17 = ar.bspstore // get current BSPSTORE - ;; - cmp.ltu p6,p7 = r17, r16 // is it less than BSP of -(p6) br.spnt.few .flush_rse - mov r19 = ar.rnat // get current RNAT - ;; - loadrs // invalidate dirty regs - br.sptk.many .restore_rnat // restore RNAT - -.flush_rse: - flushrs - ;; - mov r19 = ar.rnat // get current RNAT - mov r17 = r16 // current BSPSTORE - ;; -.restore_rnat: - // - // check if RNAT is saved between saved BSP and curr BSPSTORE - // - mov r18 = 0x3f - ;; - dep r18 = r18,r16,3,6 // get RNAT address - ;; - cmp.ltu p8,p9 = r18, r17 // RNAT saved on RSE - ;; -(p8) ld8 r19 = [r18] // get RNAT from RSE - ;; - mov ar.bspstore = r16 // set new BSPSTORE - ;; - mov ar.rnat = r19 // restore RNAT - mov ar.rsc = r14 // restore RSC conf - - - ld8 r3 = [r11], J_R4-J_LC // get lc register - ld8 r2 = [r10], J_R5-J_PREDS // get predicates - ;; - mov pr = r2, -1 - mov ar.lc = r3 - // - // restore preserved general registers & NaT's - // - ld8.fill r4 = [r11], J_R6-J_R4 - ;; - ld8.fill r5 = [r10], J_R7-J_R5 - ld8.fill r6 = [r11], J_SP-J_R6 - ;; - ld8.fill r7 = [r10], J_F2-J_R7 - ld8.fill sp = [r11], J_F3-J_SP - ;; - // - // restore floating registers - // - ldf.fill f2 = [r10], J_F4-J_F2 - ldf.fill f3 = [r11], J_F5-J_F3 - ;; - ldf.fill f4 = [r10], J_F16-J_F4 - ldf.fill f5 = [r11], J_F17-J_F5 - ;; - ldf.fill f16 = [r10], J_F18-J_F16 - ldf.fill f17 = [r11], J_F19-J_F17 - ;; - ldf.fill f18 = [r10], J_F20-J_F18 - ldf.fill f19 = [r11], J_F21-J_F19 - ;; - ldf.fill f20 = [r10], J_F22-J_F20 - ldf.fill f21 = [r11], J_F23-J_F21 - ;; - ldf.fill f22 = [r10], J_F24-J_F22 - ldf.fill f23 = [r11], J_F25-J_F23 - ;; - ldf.fill f24 = [r10], J_F26-J_F24 - ldf.fill f25 = [r11], J_F27-J_F25 - ;; - ldf.fill f26 = [r10], J_F28-J_F26 - ldf.fill f27 = [r11], J_F29-J_F27 - ;; - ldf.fill f28 = [r10], J_F30-J_F28 - ldf.fill f29 = [r11], J_F31-J_F29 - ;; - ldf.fill f30 = [r10], J_FPSR-J_F30 - ldf.fill f31 = [r11], J_B0-J_F31 ;; - - // - // restore branch registers and fpsr - // - ld8 r16 = [r10], J_B1-J_FPSR // get fpsr - ld8 r17 = [r11], J_B2-J_B0 // get return pointer - ;; - mov ar.fpsr = r16 - mov b0 = r17 - ld8 r2 = [r10], J_B3-J_B1 - ld8 r3 = [r11], J_B4-J_B2 - ;; - mov b1 = r2 - mov b2 = r3 - ld8 r2 = [r10], J_B5-J_B3 - ld8 r3 = [r11] - ;; - mov b3 = r2 - mov b4 = r3 - ld8 r2 = [r10] - ld8 r21 = [r32] // get user unat - ;; - mov b5 = r2 - mov ar.unat = r21 - - // - // invalidate ALAT - // - invala ;; - - br.ret.sptk b0 - .endp longjmp diff --git a/usr/klibc/arch/ia64/sigaction.c b/usr/klibc/arch/ia64/sigaction.c deleted file mode 100644 index 3d2dbd44..00000000 --- a/usr/klibc/arch/ia64/sigaction.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * sigaction.c - */ - -#include <signal.h> -#include <sys/syscall.h> - -/* We use -mno-pic so our function pointers are straight to the function entry - point, but the kernel always expects a descriptor. Thus we create a fake - descriptor for each possible signal, update it, and pass that to the kernel - instead (the descriptor must remain valid after returning from sigaction - until it is replaced). */ -static struct { - uintptr_t entry; - uintptr_t gp; -} signal_descriptors[_NSIG]; - -__extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *, - size_t); - -int __rt_sigaction(int sig, struct sigaction *act, - struct sigaction *oact, size_t size) -{ - sigset_t signal_mask, old_signal_mask; - uintptr_t old_entry; - int rv; - - if (sig < 0 || sig >= _NSIG) { - errno = EINVAL; - return -1; - } - - /* Mask the signal to avoid races on access to its descriptor */ - sigemptyset(&signal_mask); - sigaddset(&signal_mask, sig); - rv = sigprocmask(SIG_BLOCK, &signal_mask, &old_signal_mask); - if (rv) - return -1; - - if (oact) { - old_entry = signal_descriptors[sig].entry; - } - - if (act && act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL) { - signal_descriptors[sig].entry = (uintptr_t)act->sa_handler; - act->sa_handler - (__sighandler_t)(uintptr_t)&signal_descriptors[sig]; - } - - rv = ____rt_sigaction(sig, act, oact, size); - - if (rv) - signal_descriptors[sig].entry = old_entry; - - /* Restore signal mask */ - (void)sigprocmask(SIG_SETMASK, &old_signal_mask, NULL); - - if (oact && oact->sa_handler != SIG_IGN && - oact->sa_handler != SIG_DFL) { - oact->sa_handler = (__sighandler_t)old_entry; - } - - return rv; -} diff --git a/usr/klibc/arch/ia64/syscall.S b/usr/klibc/arch/ia64/syscall.S deleted file mode 100644 index 155fdd83..00000000 --- a/usr/klibc/arch/ia64/syscall.S +++ /dev/null @@ -1,18 +0,0 @@ -# -# arch/ia64/syscall.S -# - -#include <asm/unistd.h> - - .text - .align 32 - .proc __syscall_error - .globl __syscall_error -__syscall_error: - movl r2 = errno - ;; - st4 [r2] = r8 - mov r8 = -1 - br.ret.sptk.many b0 - .size __syscall_error, .-__syscall_error - .endp __syscall_error diff --git a/usr/klibc/arch/ia64/sysstub.ph b/usr/klibc/arch/ia64/sysstub.ph deleted file mode 100644 index 8e686c68..00000000 --- a/usr/klibc/arch/ia64/sysstub.ph +++ /dev/null @@ -1,29 +0,0 @@ -# -*- perl -*- -# -# arch/ia64/sysstub.ph -# -# Script to generate system call stubs -# - -sub make_sysstub($$$$$@) { - my($outputdir, $fname, $type, $sname, $stype, @args) = @_; - - open(OUT, '>', "${outputdir}/${fname}.S"); - print OUT "#include <asm/unistd.h>\n"; - print OUT "\n"; - print OUT "\t.text\n"; - print OUT "\t.align 32\n"; - print OUT "\t.proc ${fname}\n"; - print OUT "\t.globl ${fname}\n"; - print OUT "${fname}:\n"; - print OUT "\tmov\tr15 = __NR_${sname}\n"; - print OUT "\tbreak __BREAK_SYSCALL\n"; - print OUT "\tcmp.eq p6,p0 = -1,r10\n"; - print OUT "(p6)\tbr.few __syscall_error\n"; - print OUT "\tbr.ret.sptk.many b0\n"; - print OUT "\t.size\t${fname},.-${fname}\n"; - print OUT "\t.endp\t${fname}\n"; - close(OUT); -} - -1; diff --git a/usr/klibc/arch/ia64/vfork.S b/usr/klibc/arch/ia64/vfork.S deleted file mode 100644 index e513188b..00000000 --- a/usr/klibc/arch/ia64/vfork.S +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ia64 specific vfork syscall - * - * Written By: Martin Hicks <mort at wildopensource.com> - * - */ - -/* This syscall is a special case of the clone syscall */ -#include <asm/unistd.h> -#include <asm/signal.h> - -/* These are redefined here because linux/sched.h isn't safe for - * inclusion in asm. - */ -#define CLONE_VM 0x00000100 /* set if VM shared between processes */ -#define CLONE_VFORK 0x00004000 /* set if parent wants the child to wake it up on exit */ - -/* pid_t vfork(void) */ -/* Implemented as clone(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */ - - .align 32 - .proc vfork - .global vfork -vfork: - alloc r2=ar.pfs,0,0,2,0 - mov r15=__NR_clone - mov out0=CLONE_VM|CLONE_VFORK|SIGCHLD - mov out1=0 - break 0x100000 // Do the syscall - cmp.eq p7,p6 = -1,r10 - ;; -(p7) movl r14 = errno - ;; -(p7) st4 [r14]=r8 -(p7) mov r8=-1 - br.ret.sptk.many b0 - .endp vfork diff --git a/usr/klibc/getpriority.c b/usr/klibc/getpriority.c index 01d6e06b..3f08de8b 100644 --- a/usr/klibc/getpriority.c +++ b/usr/klibc/getpriority.c @@ -10,7 +10,7 @@ #include <sys/resource.h> #include <sys/syscall.h> -#if !defined(__alpha__) && !defined(__ia64__) +#if !defined(__alpha__) extern int __getpriority(int, int);