Age | Commit message (Collapse) | Author |
|
gcc and g++ can currently have different ideas on the size of a
packed enum type:
enum __attribute__((packed)) foo { a = 0, b};
gcc: 1
g++: 4
enum foo { a = 0, b} __attribute__((packed));
gcc: 1
g++: 1
The first format is actually the preferred one according to the
documentation.
https://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Type-Attributes.html
g++ will accept the first format and silently not actually choose a
smaller size.
This was responsible for memory corruption with recent versions
of Mesa where c and c++ code share a header with a packed enum type.
The problem was reported in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219
and fixed in gcc >= 4.3.6 in rev 144284.
This was after the switch from gplv2 but it's a trivial one line change.
ok guenther@ deraadt@ kettenis@
|
|
ok pascal@
|
|
This symbol isn't used anywhere outside libstdc++, thus no bump.
Upstream initially went the samy way, but then implemented a different fix,
which don't work for us. Eventually we should move to whitelisting the list
of symbols exported anyway.
okay miod@, no objections from sthen@; also supported by a few a while ago
|
|
Suggested earlier by guenther@, discussed with miod@
|
|
creating calls: cache the RTL, let a declaration alter the asm spec, and
set the same RTL attributes. For all three, let a declaration set the ELF
visibility.
ok miod@
|
|
is defined), and make this work on unsigned char platforms by using
isascii() instead of < 0.
While there, do not use the local getopt() implementation, as libc has had
getopt_long() support for years now.
With help from jca@ and guenther@. ok millert@, deraadt@ (on an earlier diff)
|
|
This will make the segment containing those sections read-only for binaries
that use the OpenBSD W^X layout, preventing W^X violations on architectures
that need an executable GOT (basically BSS-PLT powerpc).
ok miod@
|
|
are only two loadable segments. With W^X on OpenBSD, we will typically
create more than two. Most shared libraries and binaries end up with
five of them. One of them is the GOT itself so we don't need to take that
one into account. So raise the number of spare local GOT entries from 5 to 7.
This fixes building liblto_plugin.so in the gcc 4.9 port.
ok miod@, jasper@, pascal@
|
|
a reasonable 64-bit ABI for 64-bit ELF files instead of a 32-bit ABI.
|
|
ok visa@, deraadt@
|
|
This fix first appeared in FSF binutils after the switch to GPLv3.
However Daniel Jacobowitz, who wrote the fix, confirms he worked for
CodeSourcery at the time (as suggested by the ChangeLog entry), and
CodeSourcery included this fix in the 4.1-176 version of their
toolchain that was distributed under GPLv2.
ok guenther@, ok deraadt@
|
|
Jumbo merges are NOT WELCOME. They have to be seperated out and tested.
|
|
|
|
post-binutils 2.17 but pre-GPLv3 commits.
miod@ says now is the time to get this in.
|
|
This makes the -msecure-plt option work, which is necessary to generate
Secure-PLT ABI code.
|
|
remaining commented out variable settings. We'll continue to use the
same layout for both BSS-PLT and Secure-PLT since supporting the more
relro friendly layout that Linux uses isn't compatible with our way of
making the PLT and GOT read-only.
|
|
This smells like a workaround but it allows audio/mpd to
build and the resulting binary runs well enough to make
landry@ happy. In any case, having a broken binary is not
much worse than not having a binary because ld(1) crashed.
ok miod@, deraadt@
|
|
required by the upcoming libm work.
OK miod@.
|
|
to the gcc info documentation as well.
|
|
aes{dec{,last},enc{,last},imc} instructions (regression in 2.17).
Correctly disassemble aeskeygenassist.
Before (binutils 2.15):
0: 66 0f 38 db c8 aesimc %xmm0,%xmm1
5: 66 0f 3a 44 da 04 pclmulqdq $0x4,%xmm2,%xmm3
b: 66 0f 3a 44 ec 10 pclmullqhqdq %xmm4,%xmm5
11: 66 data16
12: 0f .byte 0xf
13: 3a df cmp %bh,%bl
15: fe 08 decb (%rax)
Currently (binutils 2.17):
0: 66 data16
1: 0f 38 db aesimc %xmm1,%xmm1
4: c8 66 0f 3a enterq $0xf66,$0x3a
8: 44 da 04 66 rexX fiaddl (%rsi,2)
c: 0f 3a 44 ec 10 pclmullqhqdq %xmm4,%xmm5
11: 66 data16
12: 0f .byte 0xf
13: 3a df cmp %bh,%bl
15: fe 08 decb (%rax)
With these changes:
0: 66 0f 38 db c8 aesimc %xmm0,%xmm1
5: 66 0f 3a 44 da 04 pclmulqdq $0x4,%xmm2,%xmm3
b: 66 0f 3a 44 ec 10 pclmullqhqdq %xmm4,%xmm5
11: 66 0f 3a df fe 08 aeskeygenassist $0x8,%xmm6,%xmm7
|
|
random stream. Only srand() should give real random values. Make
our pimped Perl more compatible with the rest of the world.
OK afresh1@ millert@
|
|
|
|
building a static binary out of PIE objects; similar to the logic
found on other platforms, for some reason arm was lacking this fix.
|
|
gets a chance to be reordered.
|
|
world uses them.
|
|
this is allowed in C11 and 3rd-party software is relying upon this to be
accepted by the compiler.
Nevertheless warn about this if -pedantic.
ok ajacoutot@ deraadt@ millert@
|
|
allow non "sy"/0xf options for dmb. This omits the *ld options
available in armv8 running in a32 mode. Similiar changes made in
freebsd.
ok miod@
|
|
heap-buffer overflow.
From Sebastian Trahm; OK deraadt@
|
|
|
|
for (undefined) references with non-default visibility on mips64.
|
|
hasn't been required for a while.
|
|
obtained by passing --no-secureplt to ld(1), or -Wl,--no-secureplt to cc(1)
when linking.
|
|
only used by the alpha backend and allow it to produce more precise
relocation information, but need a recent as(1) for this to work.
This will be necessary to enable secureplt by default.
|
|
build logic.
|
|
|
|
kernel, and hopefully userland as well.
|
|
|
|
|
|
Flag bits worked out with kettenis@
ok mlarkin@
|
|
pointed out by miod@
|
|
|
|
non-default visibility.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20218 for details.
This version comes from FreeBSD and has been made available under the GPLv2
license. It has some additional bits thrown in from me to make it work in
mips64 too, and another bit to stop the C++ compiler to randomly emit
visibility information for C++ symbols that in the end aren't referenced.
ok guenther@
|
|
C and C++ when wanting to pass flags to only the C compiler.
Tested in a ports bulk build by naddy and the handful of problems
found were fixed by naddy, jca and pascal.
|
|
binutils 2.15, it introduces bogus failures when inter-library dependencies
are present.
With the binutils 2.17 behaviour restored, --as-needed will cause linker
failures when necessary inter-library dependencies are not present. This is
actually a good thing as binutils 2.15 will silently produce executables
that will fail at runtime in those cases.
ok miod@
|
|
ok kettenis@
|
|
at least for now, as it would result in a partially writable GOT. Our
ld.so(1) has the smarts to properly write-protect the single .got, so we
don't need this.
ok guenther@
|
|
Original commit message:
Change gcc and ld semantics to make static PIE the default when invoking
'cc -static'. To explicitly request the legacy behaviour, use -nopie.
For the few port affected by this, bumps will follow shortly.
looks good to kettenis@, ok kurt@
|
|
|
|
|
|
|