Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-07 Thread Richard Biener
On Wed, 6 Nov 2013, Torbjorn Granlund wrote: Exact decision for the change? I'm not sure what you mean by 'decision' there. If you're wondering about the _reason_ for the change (why we did it), the answer is so that ASLR is applied not just to the code in shared libraries but

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-07 Thread Stuart Henderson
On 2013/11/07 10:43, Richard Biener wrote: I understand that on OpenBSD -fpie is now simply the default (for SUSE we build selected security relevant apps with -fpie, not all apps due to the fear of runtime overhead). That is correct, -fpie is the

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-06 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I don't understand the fine details of which reloc types make sense in pic code, but if I understand Philip correctly, the main problem is not a ABI change, but changed compiler default. And then you get link errors when linking together pic

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-06 Thread Philip Guenther
On Wed, 6 Nov 2013, Torbjorn Granlund wrote: ... The change makes be quite worried, since it *seems* to be done without proper understanding of the issues involved. Appearances can be deceiving. Furthermore, the ABI change has not been properly announced, I guess the release announcement

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-06 Thread Ville Valkonen
On 7 November 2013 04:24, Philip Guenther guent...@gmail.com wrote: On Wed, 6 Nov 2013, Torbjorn Granlund wrote: ... The change makes be quite worried, since it *seems* to be done without proper understanding of the issues involved. Appearances can be deceiving. Furthermore, the ABI

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-05 Thread Philip Guenther
On Tue, 5 Nov 2013, Torbjorn Granlund wrote: Philip Guenther guent...@gmail.com writes: Ah, but you are, sorta. In OpenBSD 5.3, platforms where the compiler and toolchain support were for robust for it were switched to build PIE objects and executables by default. So yes, that

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-05 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: Now we have (at least) two OpenBSD ABIs for AMD64, pre 5.3 and now 5.3, 5.4. To make sense of things, I would not be surprised to see R_X86_64_64 banned from 5.5 and on, creating a 3rd OpenBSD AMD64 ABI. I don't understand the fine details of which

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-05 Thread Mark Kettenis
From: ni...@lysator.liu.se (Niels =?iso-8859-1?Q?M=F6ller?=) Date: Tue, 05 Nov 2013 15:39:35 +0100 Torbjorn Granlund t...@gmplib.org writes: Now we have (at least) two OpenBSD ABIs for AMD64, pre 5.3 and now 5.3, 5.4. To make sense of things, I would not be surprised to see

Re: Amd64 relocation R_X86_64_32S in a static lib

2013-11-04 Thread Philip Guenther
On Tue, 5 Nov 2013, Torbjorn Granlund wrote: I am working on getting the GMP bignum library to work better on OpenBSD. With current GMP sources (GMP 5.0.x, 5.1.x, and development head) a 'fat' build will not work on amd64 under OpenBSD 5.3 and 5.4. With older version of OpenBSD (I've