mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-11 22:00:08 +00:00
edd8d70b91
This bumps the highest valid EI_ABIVERSION value to ABSOLUTE ABI. New testcase loads the symbol from the GOT with the "lb" instruction so that the EI_ABIVERSION header field of the shared object is set to ABSOLUTE (it doesn't actually check the value of the symbol), and makes sure that the main executable is executed without "ABI version invalid" error. Tested for all three ABIs (o32, n32, n64) using both static linker which handles undefined weak symbols correctly [1] (and sets the EI_ABIVERSION of the test module) and the one that doesn't (EI_ABIVERSION left as 0). [1] https://sourceware.org/ml/binutils/2018-07/msg00268.html [BZ #24916] * sysdeps/mips/Makefile [$(subdir) = elf] (tests): Add tst-undefined-weak. [$(subdir) = elf] (modules-names): Add tst-undefined-weak-lib. [$(subdir) = elf] ($(objpfx)tst-undefined-weak): Add dependency. * sysdeps/mips/tst-undefined-weak-lib.S: New file. * sysdeps/mips/tst-undefined-weak.c: Likewise. * sysdeps/unix/sysv/linux/mips/ldsodefs.h (VALID_ELF_ABIVERSION): Increment highest valid ABIVERSION value.
92 lines
2.4 KiB
Makefile
92 lines
2.4 KiB
Makefile
ifeq ($(subdir),misc)
|
|
sysdep_headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h \
|
|
sys/asm.h sgidefs.h
|
|
endif
|
|
|
|
ifeq ($(subdir),setjmp)
|
|
sysdep_routines += setjmp_aux
|
|
endif
|
|
|
|
ifeq ($(subdir),rt)
|
|
librt-sysdep_routines += rt-sysdep
|
|
librt-shared-only-routines += rt-sysdep
|
|
endif
|
|
|
|
ifeq ($(subdir),csu)
|
|
CPPFLAGS-crti.S += $(pic-ccflag)
|
|
CPPFLAGS-crtn.S += $(pic-ccflag)
|
|
endif
|
|
|
|
ifeq ($(subdir),nptl)
|
|
CPPFLAGS-pt-crti.S += $(pic-ccflag)
|
|
CPPFLAGS-crtn.S += $(pic-ccflag)
|
|
endif
|
|
|
|
ASFLAGS-.os += $(pic-ccflag)
|
|
# libc.a and libc_p.a must be compiled with -fPIE/-fpie for static PIE.
|
|
ASFLAGS-.o += $(pie-default)
|
|
ASFLAGS-.op += $(pie-default)
|
|
|
|
ifeq ($(subdir),elf)
|
|
ifneq ($(o32-fpabi),)
|
|
tests += tst-abi-interlink
|
|
|
|
fpabi-modules-names =
|
|
fpabi_list =
|
|
ifneq (,$(filter $(o32-fpabi),32 xx xxo))
|
|
fpabi-modules-names += tst-abi-fp32mod
|
|
CFLAGS-tst-abi-fp32mod.c += -mfp32
|
|
endif
|
|
ifneq (,$(filter $(o32-fpabi),xx))
|
|
fpabi-modules-names += tst-abi-fpxxmod
|
|
CFLAGS-tst-abi-fpxxmod.c += -mfpxx -mno-odd-spreg
|
|
endif
|
|
ifneq (,$(filter $(o32-fpabi),xx xxo))
|
|
ifeq ($(has-modd-spreg),yes)
|
|
fpabi-modules-names += tst-abi-fpxxomod
|
|
CFLAGS-tst-abi-fpxxomod.c += -mfpxx -modd-spreg
|
|
endif
|
|
endif
|
|
ifneq (,$(filter $(o32-fpabi),xx 64a))
|
|
ifeq ($(has-mpf64),yes)
|
|
fpabi-modules-names += tst-abi-fp64amod
|
|
CFLAGS-tst-abi-fp64amod.c += -mfp64 -mno-odd-spreg
|
|
endif
|
|
endif
|
|
ifneq (,$(filter $(o32-fpabi),xx xxo 64a 64))
|
|
ifeq ($(has-mpf64)-$(has-modd-spreg),yes-yes)
|
|
fpabi-modules-names += tst-abi-fp64mod
|
|
CFLAGS-tst-abi-fp64mod.c += -mfp64 -modd-spreg
|
|
endif
|
|
endif
|
|
modules-names += $(fpabi-modules-names)
|
|
|
|
comma:=,
|
|
empty:=
|
|
space:=$(empty) $(empty)
|
|
fpabi_list=$(subst $(space),$(comma),$(patsubst tst-abi-%mod,o_%,\
|
|
$(fpabi-modules-names)))
|
|
CPPFLAGS-tst-abi-interlink.c += -DFPABI_LIST=$(fpabi_list)
|
|
CPPFLAGS-tst-abi-interlink.c += -DFPABI_COUNT=$(words $(fpabi-modules-names))
|
|
CPPFLAGS-tst-abi-interlink.c += -DFPABI_NATIVE=o_fp$(o32-fpabi)
|
|
$(objpfx)tst-abi-interlink: $(libdl)
|
|
$(objpfx)tst-abi-interlink.out: $(patsubst %,$(objpfx)%.so,\
|
|
$(fpabi-modules-names))
|
|
endif
|
|
|
|
ifeq ($(mips-mode-switch),yes)
|
|
ifeq ($(o32-fpabi),xx)
|
|
tests += tst-mode-switch-1 tst-mode-switch-2 tst-mode-switch-3
|
|
$(objpfx)tst-mode-switch-1: $(shared-thread-library)
|
|
$(objpfx)tst-mode-switch-2: $(shared-thread-library)
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(subdir),elf)
|
|
tests += tst-undefined-weak
|
|
modules-names += tst-undefined-weak-lib
|
|
|
|
$(objpfx)tst-undefined-weak: $(objpfx)tst-undefined-weak-lib.so
|
|
endif
|