Open
Bug 1382942
Opened 7 years ago
Updated 2 years ago
-fno-plt breaks assumption about PIC register
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: heftig, Unassigned)
Details
Attachments
(1 file)
1.02 KB,
patch
|
Details | Diff | Splinter Review |
mpi_x86.s contains macros (GET and PUT) that assume the ebx register contains the GOT pointer. When -fno-plt is in use, this is no longer true (see https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00225.html, second paragraph). Instead, the calling functions place it in other registers like eax and ebp.
The NSS build doesn't finish as shlibsign segfaults.
The attached patch is my naive attempt at working around this by loading the GOT pointer into an unused register. It seems to work, although limits reuse of the macros. I also don't know a way to determine when -fno-plt is in use.
NSS 3.31
Arch Linux i686
Comment 1•7 years ago
|
||
I see the issue but I wonder why/when you're building with -fno-plt (I don't see you adding -fno-plt in the PKGBUILD and it's not there by default).
Flags: needinfo?(jan.steffens)
Reporter | ||
Comment 2•7 years ago
|
||
It was recently added to Arch's default CFLAGS: https://git.archlinux.org/svntogit/packages.git/commit/?h=packages/pacman&id=0cd22d4454e0e1b3ae589b95274f808001465c15
There has been some discussion on our mailing list (e.g. https://lists.archlinux.org/pipermail/arch-dev-public/2017-July/028928.html) and on IRC (no logs).
Flags: needinfo?(jan.steffens)
Updated•7 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•