diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-31 11:14:46 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-31 11:14:46 +0000 |
commit | c3966b88eeb1e0b5726ca16a70a94269d40ee152 (patch) | |
tree | 01b5267fea81493dda40ddbad0391c4a35c19c76 | |
parent | bdd421cc6d055af6a1a561344b2fa56267cad617 (diff) | |
download | glibc-c3966b88eeb1e0b5726ca16a70a94269d40ee152.zip glibc-c3966b88eeb1e0b5726ca16a70a94269d40ee152.tar.gz glibc-c3966b88eeb1e0b5726ca16a70a94269d40ee152.tar.bz2 |
Update.
1998-07-31 11:10 Ulrich Drepper <drepper@cygnus.com>
* elf/elf.h: Add lots of new symbols from Irix and Solaris.
* sysdeps/unix/sysv/linux/sigstack.c: Include stddef.h to get NULL
definition.
1998-07-31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/xcrypt.c: Use only the first 8 characters of the password.
1998-07-30 21:06 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
* sysdeps/generic/glob.c: Undefine strdup before defining it,
because bits/string2.h may have defined it already.
1998-07-29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdio-common/vfscanf.c: Optimize looking for type modifiers.
Fix recognition of 'a' modifier vs. 'a' format.
(TYPEMOD): Removed.
* stdio-common/printf-parse.h (parse_one_spec): Optimize looking
for type modifiers. Fix recognition of 'hh' modifier.
1998-07-31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/svc_unix.c: Fix typo.
1998-07-31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sysdeps/unix/sysv/linux/recvmsg.c: Don't check for SCM_CREDS before
syscall.
-rw-r--r-- | ChangeLog | 34 | ||||
-rw-r--r-- | elf/elf.h | 338 | ||||
-rw-r--r-- | stdio-common/printf-parse.h | 94 | ||||
-rw-r--r-- | stdio-common/vfscanf.c | 141 | ||||
-rw-r--r-- | sunrpc/svc_unix.c | 2 | ||||
-rw-r--r-- | sunrpc/xcrypt.c | 2 | ||||
-rw-r--r-- | sysdeps/generic/glob.c | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/recvmsg.c | 58 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sigstack.c | 1 |
9 files changed, 450 insertions, 221 deletions
@@ -1,3 +1,37 @@ +1998-07-31 11:10 Ulrich Drepper <drepper@cygnus.com> + + * elf/elf.h: Add lots of new symbols from Irix and Solaris. + + * sysdeps/unix/sysv/linux/sigstack.c: Include stddef.h to get NULL + definition. + +1998-07-31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> + + * sunrpc/xcrypt.c: Use only the first 8 characters of the password. + +1998-07-30 21:06 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> + + * sysdeps/generic/glob.c: Undefine strdup before defining it, + because bits/string2.h may have defined it already. + +1998-07-29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * stdio-common/vfscanf.c: Optimize looking for type modifiers. + Fix recognition of 'a' modifier vs. 'a' format. + (TYPEMOD): Removed. + + * stdio-common/printf-parse.h (parse_one_spec): Optimize looking + for type modifiers. Fix recognition of 'hh' modifier. + +1998-07-31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> + + * sunrpc/svc_unix.c: Fix typo. + +1998-07-31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> + + * sysdeps/unix/sysv/linux/recvmsg.c: Don't check for SCM_CREDS before + syscall. + 1998-07-30 12:38 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/ffs.c: Add ffsl entry point. @@ -180,6 +180,7 @@ typedef struct #define EM_OLD_ALPHA 41 /* Digital Alpha */ #define EM_SH 42 /* Hitachi SH */ #define EM_SPARCV9 43 /* SPARC v9 64-bit */ +#define EM_NUM 44 /* If it is necessary to assign new unofficial EM_* values, please pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the @@ -235,28 +236,30 @@ typedef struct /* Legal values for sh_type (section type). */ -#define SHT_NULL 0 /* Section header table entry unused */ -#define SHT_PROGBITS 1 /* Program data */ -#define SHT_SYMTAB 2 /* Symbol table */ -#define SHT_STRTAB 3 /* String table */ -#define SHT_RELA 4 /* Relocation entries with addends */ -#define SHT_HASH 5 /* Symbol hash table */ -#define SHT_DYNAMIC 6 /* Dynamic linking information */ -#define SHT_NOTE 7 /* Notes */ -#define SHT_NOBITS 8 /* Program space with no data (bss) */ -#define SHT_REL 9 /* Relocation entries, no addends */ -#define SHT_SHLIB 10 /* Reserved */ -#define SHT_DYNSYM 11 /* Dynamic linker symbol table */ -#define SHT_NUM 12 /* Number of defined types. */ -#define SHT_LOSUNW 0x6ffffffd /* Sun-specific low bound. */ -#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */ -#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */ -#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */ -#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */ -#define SHT_LOPROC 0x70000000 /* Start of processor-specific */ -#define SHT_HIPROC 0x7fffffff /* End of processor-specific */ -#define SHT_LOUSER 0x80000000 /* Start of application-specific */ -#define SHT_HIUSER 0x8fffffff /* End of application-specific */ +#define SHT_NULL 0 /* Section header table entry unused */ +#define SHT_PROGBITS 1 /* Program data */ +#define SHT_SYMTAB 2 /* Symbol table */ +#define SHT_STRTAB 3 /* String table */ +#define SHT_RELA 4 /* Relocation entries with addends */ +#define SHT_HASH 5 /* Symbol hash table */ +#define SHT_DYNAMIC 6 /* Dynamic linking information */ +#define SHT_NOTE 7 /* Notes */ +#define SHT_NOBITS 8 /* Program space with no data (bss) */ +#define SHT_REL 9 /* Relocation entries, no addends */ +#define SHT_SHLIB 10 /* Reserved */ +#define SHT_DYNSYM 11 /* Dynamic linker symbol table */ +#define SHT_NUM 12 /* Number of defined types. */ +#define SHT_LOSUNW 0x6ffffffb /* Sun-specific low bound. */ +#define SHT_SUNW_COMDAT 0x6ffffffb +#define SHT_SUNW_syminfo 0x6ffffffc +#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */ +#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */ +#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */ +#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */ +#define SHT_LOPROC 0x70000000 /* Start of processor-specific */ +#define SHT_HIPROC 0x7fffffff /* End of processor-specific */ +#define SHT_LOUSER 0x80000000 /* Start of application-specific */ +#define SHT_HIUSER 0x8fffffff /* End of application-specific */ /* Legal values for sh_flags (section flags). */ @@ -426,6 +429,16 @@ typedef struct #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ +#define NT_PRXREG 4 /* Contains copy of prxregset struct */ +#define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */ +#define NT_AUXV 6 /* Contains copy of auxv array */ +#define NT_GWINDOWS 7 /* Contains copy of gwindows struct */ +#define NT_PSTATUS 10 /* Contains copy of pstatus struct */ +#define NT_PSINFO 13 /* Contains copy of psinfo struct */ +#define NT_PRCRED 14 /* Contains copy of prcred struct */ +#define NT_UTSNAME 15 /* Contains copy of utsname struct */ +#define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */ +#define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */ /* Legal values for the note segment descriptor types for object files. */ @@ -865,13 +878,25 @@ typedef struct /* Legal values for e_flags field of Elf32_Ehdr. */ -#define EF_MIPS_NOREORDER 1 /* A .noreorder directive was used */ -#define EF_MIPS_PIC 2 /* Contains PIC code */ -#define EF_MIPS_CPIC 4 /* Uses PIC calling sequence */ -#define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level */ +#define EF_MIPS_NOREORDER 1 /* A .noreorder directive was used */ +#define EF_MIPS_PIC 2 /* Contains PIC code */ +#define EF_MIPS_CPIC 4 /* Uses PIC calling sequence */ +#define EF_MIPS_XGOT 8 +#define EF_MIPS_64BIT_WHIRL 16 +#define EF_MIPS_ABI2 32 +#define EF_MIPS_ABI_ON32 64 +#define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level */ /* Legal values for MIPS architecture level. */ +#define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ +#define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ +#define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ +#define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ +#define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ + +/* The following are non-official names and should ot be used. */ + #define E_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ #define E_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ #define E_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ @@ -888,19 +913,69 @@ typedef struct /* Legal values for sh_type field of Elf32_Shdr. */ -#define SHT_MIPS_LIBLIST 0x70000000 /* Shared objects used in link */ -#define SHT_MIPS_CONFLICT 0x70000002 /* Conflicting symbols */ -#define SHT_MIPS_GPTAB 0x70000003 /* Global data area sizes */ -#define SHT_MIPS_UCODE 0x70000004 /* Reserved for SGI/MIPS compilers */ -#define SHT_MIPS_DEBUG 0x70000005 /* MIPS ECOFF debugging information */ -#define SHT_MIPS_REGINFO 0x70000006 /* Register usage information */ -#define SHT_MIPS_OPTIONS 0x7000000d /* Miscellaneous options. */ -#define SHT_MIPS_DWARF 0x7000001e /* DWARF debugging information. */ -#define SHT_MIPS_EVENTS 0x70000021 /* Event section. */ +#define SHT_MIPS_LIBLIST 0x70000000 /* Shared objects used in link */ +#define SHT_MIPS_MSYM 0x70000001 +#define SHT_MIPS_CONFLICT 0x70000002 /* Conflicting symbols */ +#define SHT_MIPS_GPTAB 0x70000003 /* Global data area sizes */ +#define SHT_MIPS_UCODE 0x70000004 /* Reserved for SGI/MIPS compilers */ +#define SHT_MIPS_DEBUG 0x70000005 /* MIPS ECOFF debugging information*/ +#define SHT_MIPS_REGINFO 0x70000006 /* Register usage information */ +#define SHT_MIPS_PACKAGE 0x70000007 +#define SHT_MIPS_PACKSYM 0x70000008 +#define SHT_MIPS_RELD 0x70000009 +#define SHT_MIPS_IFACE 0x7000000b +#define SHT_MIPS_CONTENT 0x7000000c +#define SHT_MIPS_OPTIONS 0x7000000d /* Miscellaneous options. */ +#define SHT_MIPS_SHDR 0x70000010 +#define SHT_MIPS_FDESC 0x70000011 +#define SHT_MIPS_EXTSYM 0x70000012 +#define SHT_MIPS_DENSE 0x70000013 +#define SHT_MIPS_PDESC 0x70000014 +#define SHT_MIPS_LOCSYM 0x70000015 +#define SHT_MIPS_AUXSYM 0x70000016 +#define SHT_MIPS_OPTSYM 0x70000017 +#define SHT_MIPS_LOCSTR 0x70000018 +#define SHT_MIPS_LINE 0x70000019 +#define SHT_MIPS_RFDESC 0x7000001a +#define SHT_MIPS_DELTASYM 0x7000001b +#define SHT_MIPS_DELTAINST 0x7000001c +#define SHT_MIPS_DELTACLASS 0x7000001d +#define SHT_MIPS_DWARF 0x7000001e /* DWARF debugging information. */ +#define SHT_MIPS_DELTADECL 0x7000001f +#define SHT_MIPS_SYMBOL_LIB 0x70000020 +#define SHT_MIPS_EVENTS 0x70000021 /* Event section. */ +#define SHT_MIPS_TRANSLATE 0x70000022 +#define SHT_MIPS_PIXIE 0x70000023 +#define SHT_MIPS_XLATE 0x70000024 +#define SHT_MIPS_XLATE_DEBUG 0x70000025 +#define SHT_MIPS_WHIRL 0x70000026 +#define SHT_MIPS_EH_REGION 0x70000027 +#define SHT_MIPS_XLATE_OLD 0x70000028 +#define SHT_MIPS_PDR_EXCEPTION 0x70000029 /* Legal values for sh_flags field of Elf32_Shdr. */ -#define SHF_MIPS_GPREL 0x10000000 /* Must be part of global data area */ +#define SHF_MIPS_GPREL 0x10000000 /* Must be part of global data area */ +#define SHF_MIPS_MERGE 0x20000000 +#define SHF_MIPS_ADDR 0x40000000 +#define SHF_MIPS_STRINGS 0x80000000 +#define SHF_MIPS_NOSTRIP 0x08000000 +#define SHF_MIPS_LOCAL 0x04000000 +#define SHF_MIPS_NAMES 0x02000000 +#define SHF_MIPS_NODUPE 0x01000000 + + +/* Symbol tables. */ + +/* MIPS specific values for `st_other'. */ +#define STO_DEFAULT 0x0 +#define STO_INTERNAL 0x1 +#define STO_HIDDEN 0x2 +#define STO_PROTECTED 0x3 +#define STO_SC_ALIGN_UNUSED 0xff + +/* MIPS specific values for `st_info'. */ +#define STB_SPLIT_COMMON 13 /* Entries found in sections of type SHT_MIPS_GPTAB. */ @@ -927,21 +1002,107 @@ typedef struct Elf32_Sword ri_gp_value; /* $gp register value */ } Elf32_RegInfo; +/* Entries found in sections of type SHT_MIPS_OPTIONS. */ + +typedef struct +{ + unsigned char kind; /* Determines interpretation of the + variable part of descriptor. */ + unsigned char size; /* Size of descriptor, including header. */ + Elf32_Section section; /* Section header index of section affected, + 0 for global options. */ + Elf32_Word info; /* Kind-specific information. */ +} Elf_Options; + +/* Values for `kind' field in Elf_Options. */ + +#define ODK_NULL 0 /* Undefined. */ +#define ODK_REGINFO 1 /* Register usage information. */ +#define ODK_EXCEPTIONS 2 /* Exception processing options. */ +#define ODK_PAD 3 /* Section padding options. */ +#define ODK_HWPATCH 4 /* Hardware workarounds performed */ +#define ODK_FILL 5 /* record the fill value used by the linker. */ +#define ODK_TAGS 6 /* reserve space for desktop tools to write. */ +#define ODK_HWAND 7 /* HW workarounds. 'AND' bits when merging. */ +#define ODK_HWOR 8 /* HW workarounds. 'OR' bits when merging. */ + +/* Values for `info' in Elf_Options for ODK_EXCEPTIONS entries. */ + +#define OEX_FPU_MIN 0x1f /* FPE's which MUST be enabled. */ +#define OEX_FPU_MAX 0x1f00 /* FPE's which MAY be enabled. */ +#define OEX_PAGE0 0x10000 /* page zero must be mapped. */ +#define OEX_SMM 0x20000 /* Force sequential memory mode? */ +#define OEX_FPDBUG 0x40000 /* Force floating point debug mode? */ +#define OEX_PRECISEFP OEX_FPDBUG +#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults? */ + +#define OEX_FPU_INVAL 0x10 +#define OEX_FPU_DIV0 0x08 +#define OEX_FPU_OFLO 0x04 +#define OEX_FPU_UFLO 0x02 +#define OEX_FPU_INEX 0x01 + +/* Masks for `info' in Elf_Options for an ODK_HWPATCH entry. */ + +#define OHW_R4KEOP 0x1 /* R4000 end-of-page patch. */ +#define OHW_R8KPFETCH 0x2 /* may need R8000 prefetch patch. */ +#define OHW_R5KEOP 0x4 /* R5000 end-of-page patch. */ +#define OHW_R5KCVTL 0x8 /* R5000 cvt.[ds].l bug. clean=1. */ + +#define OPAD_PREFIX 0x1 +#define OPAD_POSTFIX 0x2 +#define OPAD_SYMBOL 0x4 + +/* Entry found in `.options' section. */ + +typedef struct +{ + Elf32_Word hwp_flags1; /* Extra flags. */ + Elf32_Word hwp_flags2; /* Extra flags. */ +} Elf_Options_Hw; + +/* Masks for `info' in ElfOptions for ODK_HWAND and ODK_HWOR entries. */ + +#define OHWA0_R4KEOP_CHECKED 0x00000001 +#define OHWA1_R4KEOP_CLEAN 0x00000002 + /* MIPS relocs. */ -#define R_MIPS_NONE 0 /* No reloc */ -#define R_MIPS_16 1 /* Direct 16 bit */ -#define R_MIPS_32 2 /* Direct 32 bit */ -#define R_MIPS_REL32 3 /* PC relative 32 bit */ -#define R_MIPS_26 4 /* Direct 26 bit shifted */ -#define R_MIPS_HI16 5 /* High 16 bit */ -#define R_MIPS_LO16 6 /* Low 16 bit */ -#define R_MIPS_GPREL16 7 /* GP relative 16 bit */ -#define R_MIPS_LITERAL 8 /* 16 bit literal entry */ -#define R_MIPS_GOT16 9 /* 16 bit GOT entry */ -#define R_MIPS_PC16 10 /* PC relative 16 bit */ -#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ -#define R_MIPS_GPREL32 12 /* GP relative 32 bit */ +#define R_MIPS_NONE 0 /* No reloc */ +#define R_MIPS_16 1 /* Direct 16 bit */ +#define R_MIPS_32 2 /* Direct 32 bit */ +#define R_MIPS_REL32 3 /* PC relative 32 bit */ +#define R_MIPS_26 4 /* Direct 26 bit shifted */ +#define R_MIPS_HI16 5 /* High 16 bit */ +#define R_MIPS_LO16 6 /* Low 16 bit */ +#define R_MIPS_GPREL16 7 /* GP relative 16 bit */ +#define R_MIPS_LITERAL 8 /* 16 bit literal entry */ +#define R_MIPS_GOT16 9 /* 16 bit GOT entry */ +#define R_MIPS_PC16 10 /* PC relative 16 bit */ +#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ +#define R_MIPS_GPREL32 12 /* GP relative 32 bit */ + +#define R_MIPS_SHIFT5 16 +#define R_MIPS_SHIFT6 17 +#define R_MIPS_64 18 +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 +#define R_MIPS_GOT_LO16 23 +#define R_MIPS_SUB 24 +#define R_MIPS_INSERT_A 25 +#define R_MIPS_INSERT_B 26 +#define R_MIPS_DELETE 27 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_CALL_HI16 30 +#define R_MIPS_CALL_LO16 31 +#define R_MIPS_SCN_DISP 32 +#define R_MIPS_REL16 33 +#define R_MIPS_ADD_IMMEDIATE 34 +#define R_MIPS_PJUMP 35 +#define R_MIPS_RELGOT 36 /* Legal values for p_type field of Elf32_Phdr. */ @@ -949,6 +1110,10 @@ typedef struct #define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */ #define PT_MIPS_OPTIONS 0x70000002 +/* Special program header types. */ + +#define PF_MIPS_LOCAL 0x10000000 + /* Legal values for d_tag field of Elf32_Dyn. */ #define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */ @@ -957,6 +1122,7 @@ typedef struct #define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ #define DT_MIPS_FLAGS 0x70000005 /* Flags */ #define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */ +#define DT_MIPS_MSYM 0x70000007 #define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */ #define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */ #define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */ @@ -967,7 +1133,42 @@ typedef struct #define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */ #define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ #define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */ -#define DT_MIPS_NUM 0x17 +#define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */ +#define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in + DT_MIPS_DELTA_CLASS. */ +#define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */ +#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in + DT_MIPS_DELTA_INSTANCE. */ +#define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */ +#define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in + DT_MIPS_DELTA_RELOC. */ +#define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta + relocations refer to. */ +#define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in + DT_MIPS_DELTA_SYM. */ +#define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the + class declaration. */ +#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in + DT_MIPS_DELTA_CLASSSYM. */ +#define DT_MIPS_CXX_FLAGS 0x70000022 /* Flags indicating for C++ flavor. */ +#define DT_MIPS_PIXIE_INIT 0x70000023 +#define DT_MIPS_SYMBOL_LIB 0x70000024 +#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 +#define DT_MIPS_LOCAL_GOTIDX 0x70000026 +#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 +#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 +#define DT_MIPS_OPTIONS 0x70000029 /* Address of .options. */ +#define DT_MIPS_INTERFACE 0x7000002a /* Address of .interface. */ +#define DT_MIPS_DYNSTR_ALIGN 0x7000002b +#define DT_MIPS_INTERFACE_SIZE 0x7000002c /* Size of the .interface section. */ +#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve + function stored in GOT. */ +#define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added + by rld on dlopen() calls. */ +#define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */ +#define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */ +#define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */ +#define DT_MIPS_NUM 0x32 /* Legal values for DT_MIPS_FLAG Elf32_Dyn entry. */ @@ -975,22 +1176,49 @@ typedef struct #define RHF_QUICKSTART (1 << 0) /* Use quickstart */ #define RHF_NOTPOT (1 << 1) /* Hash size not power of 2 */ #define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) /* Ignore LD_LIBRARY_PATH */ +#define RHF_NO_MOVE (1 << 3) +#define RHF_SGI_ONLY (1 << 4) +#define RHF_GUARANTEE_INIT (1 << 5) +#define RHF_DELTA_C_PLUS_PLUS (1 << 6) +#define RHF_GUARANTEE_START_INIT (1 << 7) +#define RHF_PIXIE (1 << 8) +#define RHF_DEFAULT_DELAY_LOAD (1 << 9) +#define RHF_REQUICKSTART (1 << 10) +#define RHF_REQUICKSTARTED (1 << 11) +#define RHF_CORD (1 << 12) +#define RHF_NO_UNRES_UNDEF (1 << 13) +#define RHF_RLD_ORDER_SAFE (1 << 14) /* Entries found in sections of type SHT_MIPS_LIBLIST. */ typedef struct { - Elf32_Word l_name; /* Name (string table index) */ - Elf32_Word l_time_stamp; /* Timestamp */ - Elf32_Word l_checksum; /* Checksum */ - Elf32_Word l_version; /* Interface version */ - Elf32_Word l_flags; /* Flags */ + Elf32_Word l_name; /* Name (string table index) */ + Elf32_Word l_time_stamp; /* Timestamp */ + Elf32_Word l_checksum; /* Checksum */ + Elf32_Word l_version; /* Interface version */ + Elf32_Word l_flags; /* Flags */ } Elf32_Lib; +typedef struct +{ + Elf64_Word l_name; /* Name (string table index) */ + Elf64_Word l_time_stamp; /* Timestamp */ + Elf64_Word l_checksum; /* Checksum */ + Elf64_Word l_version; /* Interface version */ + Elf64_Word l_flags; /* Flags */ +} Elf64_Lib; + + /* Legal values for l_flags. */ +#define LL_NONE 0 #define LL_EXACT_MATCH (1 << 0) /* Require exact match */ #define LL_IGNORE_INT_VER (1 << 1) /* Ignore interface version */ +#define LL_REQUIRE_MINOR (1 << 2) +#define LL_EXPORTS (1 << 3) +#define LL_DELAY_LOAD (1 << 4) +#define LL_DELTA (1 << 5) /* Entries found in sections of type SHT_MIPS_CONFLICT. */ diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h index 61468eb..4f217ab 100644 --- a/stdio-common/printf-parse.h +++ b/stdio-common/printf-parse.h @@ -271,54 +271,54 @@ parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, spec->info.is_long = 0; spec->info.is_char = 0; - if (*format == L_('h') || *format == L_('l') || *format == L_('L') || - *format == L_('Z') || *format == L_('q') || *format == L_('z') || - *format == L_('t') || *format == L_('j')) - switch (*format++) - { - case L_('h'): - /* int's are short int's. */ - if (spec->info.is_short == 0) - spec->info.is_short = 1; - else - { - spec->info.is_short = 0; - spec->info.is_char = 1; - } - break; - case L_('l'): - /* int's are long int's. */ - spec->info.is_long = 1; - if (*format != L_('l')) - break; - ++format; - /* FALLTHROUGH */ - case L_('L'): - /* double's are long double's, and int's are long long int's. */ - case L_('q'): - /* 4.4 uses this for long long. */ - spec->info.is_long_double = 1; - break; - case L_('z'): - case L_('Z'): - /* int's are size_t's. */ - assert (sizeof (size_t) <= sizeof (unsigned long long int)); - spec->info.is_longlong = sizeof (size_t) > sizeof (unsigned long int); - spec->info.is_long = sizeof (size_t) > sizeof (unsigned int); - break; - case L_('t'): - assert (sizeof (ptrdiff_t) <= sizeof (unsigned long long int)); - spec->info.is_longlong = (sizeof (ptrdiff_t) - > sizeof (unsigned long int)); - spec->info.is_long = sizeof (ptrdiff_t) > sizeof (unsigned int); - break; - case L_('j'): - assert (sizeof (intmax_t) <= sizeof (unsigned long long int)); - spec->info.is_longlong = (sizeof (intmax_t) - > sizeof (unsigned long int)); - spec->info.is_long = sizeof (intmax_t) > sizeof (unsigned int); + switch (*format++) + { + case L_('h'): + /* ints are short ints or chars. */ + if (*format != L_('h')) + spec->info.is_short = 1; + else + { + ++format; + spec->info.is_char = 1; + } + break; + case L_('l'): + /* ints are long ints. */ + spec->info.is_long = 1; + if (*format != L_('l')) break; - } + ++format; + /* FALLTHROUGH */ + case L_('L'): + /* doubles are long doubles, and ints are long long ints. */ + case L_('q'): + /* 4.4 uses this for long long. */ + spec->info.is_long_double = 1; + break; + case L_('z'): + case L_('Z'): + /* ints are size_ts. */ + assert (sizeof (size_t) <= sizeof (unsigned long long int)); + spec->info.is_longlong = sizeof (size_t) > sizeof (unsigned long int); + spec->info.is_long = sizeof (size_t) > sizeof (unsigned int); + break; + case L_('t'): + assert (sizeof (ptrdiff_t) <= sizeof (long long int)); + spec->info.is_longlong = (sizeof (ptrdiff_t) > sizeof (long int)); + spec->info.is_long = sizeof (ptrdiff_t) > sizeof (int); + break; + case L_('j'): + assert (sizeof (uintmax_t) <= sizeof (unsigned long long int)); + spec->info.is_longlong = (sizeof (uintmax_t) + > sizeof (unsigned long int)); + spec->info.is_long = sizeof (uintmax_t) > sizeof (unsigned int); + break; + default: + /* Not a recognized modifier. Backup. */ + --format; + break; + } /* Get the format specification. */ spec->info.spec = (wchar_t) *format++; diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index ce5e512..116b19b 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -47,8 +47,6 @@ # define MALLOC 0x100 /* a: malloc strings */ # define CHAR 0x200 /* hh: char */ -# define TYPEMOD (LONG|LONGDBL|SHORT|CHAR) - #ifdef USE_IN_LIBIO # include <libioP.h> @@ -408,84 +406,69 @@ __vfscanf (FILE *s, const char *format, va_list argptr) width = -1; /* Check for type modifiers. */ - while (*f == 'h' || *f == 'l' || *f == 'L' || *f == 'a' || *f == 'q' - || *f == 'z' || *f == 't' || *f == 'j') - switch (*f++) - { - case 'h': - /* int's are short int's. */ - if (flags & (LONG|LONGDBL|CHAR)) - /* Signal illegal format element. */ - conv_error (); - if (flags & SHORT) - { - flags &= ~SHORT; - flags |= CHAR; - } - else - flags |= SHORT; - break; - case 'l': - if (flags & (SHORT|LONGDBL|CHAR)) - conv_error (); - else if (flags & LONG) - { - /* A double `l' is equivalent to an `L'. */ - flags &= ~LONG; - flags |= LONGDBL; - } - else - /* int's are long int's. */ - flags |= LONG; - break; - case 'q': - case 'L': - /* double's are long double's, and int's are long long int's. */ - if (flags & TYPEMOD) - /* Signal illegal format element. */ - conv_error (); - flags |= LONGDBL; - break; - case 'a': - /* The `a' is used as a flag only if followed by `s', `S' or - `['. */ - if (*f != 's' && *f != 'S' && *f != '[') - { - --f; - break; - } - if (flags & TYPEMOD) - /* Signal illegal format element. */ - conv_error (); - /* String conversions (%s, %[) take a `char **' - arg and fill it in with a malloc'd pointer. */ - flags |= MALLOC; - break; - case 'z': - if (flags & (SHORT|LONGDBL|CHAR)) - conv_error (); - if (sizeof (size_t) > sizeof (unsigned long int)) - flags |= LONGDBL; - else if (sizeof (size_t) > sizeof (unsigned int)) - flags |= LONG; - break; - case 'j': - if (flags & (SHORT|LONGDBL|CHAR)) - conv_error (); - if (sizeof (intmax_t) > sizeof (unsigned long int)) - flags |= LONGDBL; - else if (sizeof (intmax_t) > sizeof (unsigned int)) - flags |= LONG; - break; - case 't': - if (flags & (SHORT|LONGDBL|CHAR)) - conv_error (); - if (sizeof (ptrdiff_t) > sizeof (unsigned long int)) + switch (*f++) + { + case 'h': + /* ints are short ints or chars. */ + if (*f == 'h') + { + ++f; + flags |= CHAR; + } + else + flags |= SHORT; + break; + case 'l': + if (*f == 'l') + { + /* A double `l' is equivalent to an `L'. */ + ++f; flags |= LONGDBL; - else if (sizeof (ptrdiff_t) > sizeof (unsigned int)) - flags |= LONG; - break; - } + } + else + /* ints are long ints. */ + flags |= LONG; + break; + case 'q': + case 'L': + /* doubles are long doubles, and ints are long long ints. */ + flags |= LONGDBL; + break; + case 'a': + /* The `a' is used as a flag only if followed by `s', `S' or + `['. */ + if (*f != 's' && *f != 'S' && *f != '[') + { + --f; + break; + } + /* String conversions (%s, %[) take a `char **' + arg and fill it in with a malloc'd pointer. */ + flags |= MALLOC; + break; + case 'z': + if (sizeof (size_t) > sizeof (unsigned long int)) + flags |= LONGDBL; + else if (sizeof (size_t) > sizeof (unsigned int)) + flags |= LONG; + break; + case 'j': + if (sizeof (uintmax_t) > sizeof (unsigned long int)) + flags |= LONGDBL; + else if (sizeof (uintmax_t) > sizeof (unsigned int)) + flags |= LONG; + break; + case 't': + if (sizeof (ptrdiff_t) > sizeof (long int)) + flags |= LONGDBL; + else if (sizeof (ptrdiff_t) > sizeof (int)) + flags |= LONG; + break; + default: + /* Not a recognized modifier. Backup. */ + --f; + break; + } /* End of the format string? */ if (*f == '\0') diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index df56d9b..a8ed534 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -138,7 +138,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) } memset (&addr, '\0', sizeof (addr)); addr.sun_family = AF_UNIX; - len = strlen (addr.sun_path) + 1; + len = strlen (path) + 1; memcpy (addr.sun_path, path, len); len += sizeof (addr.sun_family); diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c index d770a7d..bee38ad 100644 --- a/sunrpc/xcrypt.c +++ b/sunrpc/xcrypt.c @@ -143,7 +143,7 @@ passwd2des (char *pw, char *key) int i; memset (key, 0, 8); - for (i = 0; *pw; i = (i + 1) % 8) + for (i = 0; *pw && i < 8; ++i) key[i] ^= *pw++ << 1; des_setparity (key); diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c index 7ab4899..bd92d68 100644 --- a/sysdeps/generic/glob.c +++ b/sysdeps/generic/glob.c @@ -245,6 +245,7 @@ extern char *alloca (); #endif #ifdef _LIBC +# undef strdup # define strdup(str) __strdup (str) # define sysconf(id) __sysconf (id) # define closedir(dir) __closedir (dir) diff --git a/sysdeps/unix/sysv/linux/recvmsg.c b/sysdeps/unix/sysv/linux/recvmsg.c index 66970bc..52a0abc 100644 --- a/sysdeps/unix/sysv/linux/recvmsg.c +++ b/sysdeps/unix/sysv/linux/recvmsg.c @@ -39,53 +39,35 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags) { struct cmsghdr *cm; int ret; - int found_creds = 0; - /* Must check for space first. */ + ret = __syscall_recvmsg (fd, message, flags); + + if (ret == -1) + return ret; + + /* Postprocess the message control block for SCM_CREDS. */ cm = CMSG_FIRSTHDR (message); while (cm) { if (cm->cmsg_type == SCM_CREDS) - { - if (cm->cmsg_len < CMSG_SPACE (sizeof (struct cmsgcred))) - { - __set_errno (EINVAL); - return -1; - } - found_creds = 1; + { + struct cmsgcred *c = (struct cmsgcred *) CMSG_DATA (cm); + struct __kernel_ucred u; + int i; + memcpy (&u, CMSG_DATA (cm), sizeof (struct __kernel_ucred)); + + c->cmcred_pid = u.pid; + c->cmcred_uid = u.uid; + c->cmcred_gid = u.gid; + + c->cmcred_euid = -1; + c->cmcred_ngroups = 0; + for (i = 0; i < CMGROUP_MAX; i++) + c->cmcred_groups[i] = -1; } cm = CMSG_NXTHDR (message, cm); } - - ret = __syscall_recvmsg (fd, message, flags); - - if (ret == -1) - return ret; - - /* Postprocess the message control block for SCM_CREDS. */ - cm = CMSG_FIRSTHDR (message); - if (found_creds) - while (cm) - { - if (cm->cmsg_type == SCM_CREDS) - { - struct cmsgcred *c = (struct cmsgcred *) CMSG_DATA (cm); - struct __kernel_ucred u; - int i; - memcpy (&u, CMSG_DATA (cm), sizeof (struct __kernel_ucred)); - - c->cmcred_pid = u.pid; - c->cmcred_uid = u.uid; - c->cmcred_gid = u.gid; - - c->cmcred_euid = -1; - c->cmcred_ngroups = 0; - for (i = 0; i < CMGROUP_MAX; i++) - c->cmcred_groups[i] = -1; - } - cm = CMSG_NXTHDR (message, cm); - } return ret; } diff --git a/sysdeps/unix/sysv/linux/sigstack.c b/sysdeps/unix/sysv/linux/sigstack.c index cbae972..eb95f20 100644 --- a/sysdeps/unix/sysv/linux/sigstack.c +++ b/sysdeps/unix/sysv/linux/sigstack.c @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include <signal.h> +#include <stddef.h> #include <sys/syscall.h> |