glibc/bits
H.J. Lu e27f41ba2b Add <bits/indirect-return.h>
Add <bits/indirect-return.h> and include it in <ucontext.h>.
__INDIRECT_RETURN defined in <bits/indirect-return.h> indicates if
swapcontext requires special compiler treatment.  The default
__INDIRECT_RETURN is empty.

On x86, when shadow stack is enabled, __INDIRECT_RETURN is defined
with indirect_return attribute, which has been added to GCC 9, to
indicate that swapcontext returns via indirect branch.  Otherwise
__INDIRECT_RETURN is defined with returns_twice attribute.

When shadow stack is enabled, remove always_inline attribute from
prepare_test_buffer in string/tst-xbzero-opt.c to avoid:

tst-xbzero-opt.c: In function ‘prepare_test_buffer’:
tst-xbzero-opt.c:105:1: error: function ‘prepare_test_buffer’ can never be inlined because it uses setjmp
 prepare_test_buffer (unsigned char *buf)

when indirect_return attribute isn't available.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	* bits/indirect-return.h: New file.
	* misc/sys/cdefs.h (__glibc_has_attribute): New.
	* sysdeps/x86/bits/indirect-return.h: Likewise.
	* stdlib/Makefile (headers): Add bits/indirect-return.h.
	* stdlib/ucontext.h: Include <bits/indirect-return.h>.
	(swapcontext): Add __INDIRECT_RETURN.
	* string/tst-xbzero-opt.c (ALWAYS_INLINE): New.
	(prepare_test_buffer): Use it.
2018-07-24 07:55:47 -07:00
..
types hurd: remove non-standard siginfo symbol 2018-04-19 21:43:44 +02:00
byteswap.h Unify and simplify bits/byteswap.h, bits/byteswap-16.h headers (bug 14508, bug 15512, bug 17082, bug 20530). 2018-02-06 21:55:08 +00:00
confname.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dirent.h Define _DIRENT_MATCHES_DIRENT64 regardless 2018-03-05 18:10:04 -03:00
dlfcn.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elfclass.h Update. 1999-07-27 05:53:25 +00:00
endian.h
environments.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
errno.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fcntl.h hurd: Fix comments for FREAD and FWRITE 2018-01-29 23:00:17 +01:00
fenv.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fenvinline.h Update. 1999-11-11 01:05:26 +00:00
floatn-common.h powerpc: Fix the compiler type used with C++ when -mabi=ieeelongdouble 2018-05-11 18:05:03 -03:00
floatn.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
flt-eval-method.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fp-fast.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fp-logb.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
hwcap.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
in.h hurd: Fix symbols exposition 2018-04-19 20:14:45 +02:00
indirect-return.h Add <bits/indirect-return.h> 2018-07-24 07:55:47 -07:00
ioctl-types.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ioctls.h
ipc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ipctypes.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
iscanonical.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-header-start.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libm-simd-decl-stubs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
link.h * csu/elf-init.c (__libc_csu_fini): Don't do anything here. 2005-01-06 22:40:27 +00:00
local_lim.h
long-double.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
math-vector.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mathdef.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mathinline.h * configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline. 2007-03-17 17:04:28 +00:00
mman.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mqueue.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
msq.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
netdb.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
param.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
poll.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
posix_opt.h
pthreadtypes.h 2002-11-10 Roland McGrath <roland@redhat.com> 2002-11-10 23:22:35 +00:00
resource.h hurd: Add missing RLIM_SAVED_MAX/CUR 2018-04-19 23:55:13 +02:00
sched.h hurd: Avoid exposing all <sched.h> symbols from sys/types.h 2018-04-19 20:24:36 +02:00
select.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sem.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setjmp.h
shm.h hurd: Fix shmid_ds's shm_segsz field type 2018-06-02 21:52:43 +02:00
sigaction.h hurd: Fix includability of <hurd/signal.h> in all standards 2018-03-05 22:50:29 +01:00
sigcontext.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sigevent-consts.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
siginfo-consts.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
signum-generic.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
signum.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sigstack.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sigthread.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sockaddr.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
socket.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ss_flags.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stat.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
statfs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
statvfs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdint-intn.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdint-uintn.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdlib-bsearch.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stropts.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sys_errlist.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
syslog-path.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sysmacros.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
termios.h hurd: Fix termios.h symbols 2018-04-19 23:50:12 +02:00
time.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
typesizes.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
uintn-identity.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
uio_lim.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
uio-ext.h Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947] 2018-04-03 12:19:29 -07:00
utmp.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
utsname.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
waitflags.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
waitstatus.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wchar.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wordsize.h Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
xtitypes.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00