Bug 737 - support -mno-tls-direct-seg-refs builds
Summary: support -mno-tls-direct-seg-refs builds
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.4
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
Depends on:
Blocks: libc235
  Show dependency treegraph
 
Reported: 2005-02-16 04:44 UTC by Roland McGrath
Modified: 2018-04-20 13:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland McGrath 2005-02-16 04:44:37 UTC
This trunk change is needed on the 2.3 branch.

2005-01-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysdep.h
	(SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm.
nptl/
	* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
	Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
	at least gotntpoff relocation and addition.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
	Likewise.

2005-01-23  Roland McGrath  <roland@redhat.com>

	* sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears
	in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS.
	* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]
	(SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer
	from %gs:0 and add to that value, rather that direct %gs:OFFSET access.
	* sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise.
Comment 1 cvs-commit@gcc.gnu.org 2005-02-16 11:07:48 UTC
Subject: Bug 737

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-16 11:07:22

Modified files:
	sysdeps/i386   : Makefile 
	sysdeps/unix/i386: sysdep.S 

Log message:
	2005-01-23  Roland McGrath  <roland@redhat.com>
	
	[BZ #737]
	* sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears
	in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS.
	* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]
	(SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer
	from %gs:0 and add to that value, rather that direct %gs:OFFSET access.
	* sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/Makefile.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.17&r2=1.17.2.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/i386/sysdep.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.23&r2=1.23.2.1

Comment 2 cvs-commit@gcc.gnu.org 2005-02-16 11:07:48 UTC
Subject: Bug 737

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-16 11:07:27

Modified files:
	sysdeps/unix/sysv/linux/i386: sysdep.h 

Log message:
	2005-01-26  Jakub Jelinek  <jakub@redhat.com>
	
	[BZ #737]
	* sysdeps/unix/sysv/linux/i386/sysdep.h
	(SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm.
	2005-01-23  Roland McGrath  <roland@redhat.com>
	
	[BZ #737]
	* sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears
	in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS.
	* sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]
	(SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer
	from %gs:0 and add to that value, rather that direct %gs:OFFSET access.
	* sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/i386/sysdep.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.57&r2=1.57.2.1

Comment 3 cvs-commit@gcc.gnu.org 2005-02-16 11:08:10 UTC
Subject: Bug 737

CVSROOT:	/cvs/glibc
Module name:	libc
Branch: 	glibc-2_3-branch
Changes by:	roland@sources.redhat.com	2005-02-16 11:07:45

Modified files:
	nptl/sysdeps/unix/sysv/linux/i386/i486: sem_post.S 
	                                        sem_timedwait.S 
	                                        sem_trywait.S sem_wait.S 

Log message:
	2005-01-26  Jakub Jelinek  <jakub@redhat.com>
	
	[BZ #737]
	* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
	Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
	at least gotntpoff relocation and addition.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
	Likewise.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.6&r2=1.6.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.6&r2=1.6.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.4&r2=1.4.4.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.5&r2=1.5.4.1

Comment 4 Roland McGrath 2005-04-05 23:59:21 UTC
These changes are in the 2.3 branch as well as the trunk now.