Commit Graph

6273 Commits

Author SHA1 Message Date
Hans Petter Selasky
9a0603fa5f Add makefile for the "osmtest" utility. While at it:
- Fix depend target by removing a space after an "-I" inclusion option.
- Fix some minor compile issues in the "osmtest" utility.

MFC after:	3 days
PR:		196580
Sponsored by:	Mellanox Technologies
2015-01-08 14:45:54 +00:00
Ed Maste
9a1048f7e5 nm: Accept long option --extern-only for -g
Submitted by:	jkim
2015-01-08 14:35:16 +00:00
Hans Petter Selasky
dda7d972d5 Fix for compilation issue. Don't use the "abs()" function for unsigned
computations.

MFC after:	3 days
PR:		196597
Sponsored by:	Mellanox Technologies
2015-01-08 10:13:56 +00:00
Hajimu UMEMOTO
359f2b4604 Correct comparison of IPv6 wildcard address.
MFC after:	3 days
2015-01-08 07:47:39 +00:00
Enji Cooper
c60d58825d Remove unnecessary .include of bsd.own.mk
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2015-01-08 02:36:43 +00:00
Enji Cooper
589497e4e0 Build contrib/ofed/usr.{bin,lib} in parallel
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-01-08 02:11:13 +00:00
Enji Cooper
585d162280 Fix 'make depend' before infiniband headers have been installed to build host
by removing space between -I and the header directory

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-01-08 02:04:37 +00:00
Xin LI
3c602fabf9 MFV r276761: tcpdump 4.6.2.
MFC after:	1 month
2015-01-07 19:55:18 +00:00
Dimitry Andric
61b3223976 Add llvm patch corresponding to r276786. 2015-01-07 19:38:52 +00:00
Dimitry Andric
6849e1fd53 Pull in r222292 from upstream llvm trunk (by Weiming Zhao):
[Aarch64] Customer lowering of CTPOP to SIMD should check for NEON
  availability

This ensures llvm's AArch64 backend does not emit floating point
instructions if they are disabled.
2015-01-07 19:37:26 +00:00
Ed Maste
a737d64c08 libelf: Add arm64 config
Upstream elftoolchain ticket: #470
Submitted by:	Andrew Turner
Sponsored by:	The FreeBSD Foundation
2015-01-07 19:34:44 +00:00
Xin LI
681ed54caa MFV r276759: libpcap 1.6.2.
MFC after:	1 month
2015-01-06 22:29:12 +00:00
Ed Maste
02b08c9092 readelf: Handle note types from different operating systems
Previously elftoolchain readelf(1) produced correct description text
only for Linux note types.

Upstream elftoolchain ticket #473

Differential Revision:	https://reviews.freebsd.org/D1428
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2015-01-05 16:05:15 +00:00
Dag-Erling Smørgrav
31099b506d mfv (r276698): support for remote control over local sockets. 2015-01-05 14:59:18 +00:00
Ed Maste
a726543364 addr2line: fflush output after each address lookup
Certain tools spawn addr2line and pass addresses one at a time for
resolution.

PR:		195561
Reported by:	antoine
Sponsored by:	The FreeBSD Foundation
2015-01-05 04:56:38 +00:00
Enji Cooper
a812392203 Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-04 23:41:17 +00:00
Baptiste Daroussin
bbb0fbde9a Add pregenerated documentation for as(1) and ld(1) 2015-01-04 00:58:30 +00:00
Baptiste Daroussin
4a3e081c7b Fix generating documentation with modern texinfo 2015-01-04 00:54:29 +00:00
Baptiste Daroussin
321f9e5ad9 Fix generating documents with modern texinfo 2015-01-04 00:44:24 +00:00
Baptiste Daroussin
04803ab217 Import NetBSD vis(1) mandoc fixes 2015-01-03 23:16:13 +00:00
Konstantin Belousov
8495e8b1e9 Fix known issues which blow up the process after dlopen("libthr.so")
(or loading a dso linked to libthr.so into process which was not
linked against threading library).

- Remove libthr interposers of the libc functions, including
  __error(). Instead, functions calls are indirected through the
  interposing table, similar to how pthread stubs in libc are already
  done.  Libc by default points either to syscall trampolines or to
  existing libc implementations.  On libthr load, libthr rewrites the
  pointers to the cancellable implementations already in libthr.  The
  interposition table is separate from pthreads stubs indirection
  table to not pull pthreads stubs into static binaries.

- Postpone the malloc(3) internal mutexes initialization until libthr
  is loaded.  This avoids recursion between calloc(3) and static
  pthread_mutex_t initialization.

- Reinstall signal handlers with wrapper on libthr load.  The
  _rtld_is_dlopened(3) is used to avoid useless calls to sigaction(2)
  when libthr is statically referenced from the main binary.

In the process, fix openat(2), swapcontext(2) and setcontext(2)
interposing.  The libc symbols were exported at different versions
than libthr interposers.  Export both libc and libthr versions from
libc now, with default set to the higher version from libthr.

Remove unused and disconnected swapcontext(3) userspace implementation
from libc/gen.

No objections from:	deischen
Tested by:	pho, antoine (exp-run) (previous versions)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-03 18:38:46 +00:00
Dag-Erling Smørgrav
c809460030 Add generated files. 2015-01-03 11:52:43 +00:00
Dag-Erling Smørgrav
ff8258499c Upgrade to Unbound 1.5.1. Almost all our local changes to date have been
adopted upstream, greatly reducing the diff.
2015-01-03 02:40:51 +00:00
Dag-Erling Smørgrav
7ca2a8903f Recognize the lexer and parser sources. 2015-01-03 00:31:52 +00:00
Jilles Tjoelker
d79f904ad2 Link lib/libc/c063 tests to the build.
Some files lack required #include <sys/stat.h>. The #ifdef is per ngie's
request; the includes are clearly necessary for struct stat.

The faccessat test fails because it tries to use AT_SYMLINK_NOFOLLOW with
faccessat(), which is not specified by POSIX.1-2008.

Differential Revision:	https://reviews.freebsd.org/D1411
Reviewed by:	ngie
2015-01-02 22:49:05 +00:00
Xin LI
4460e5b02d MFV r276568:
Update file to 5.22.

MFC after:	2 weeks
2015-01-02 21:20:02 +00:00
Ed Maste
34e3f14688 readelf: Correct rounding on note padding
In general 64-bit ELF notes use 4-byte padding, not 8, despite what is
claimed in various specs.

Upstream elftoolchain ticket 472
https://sourceforge.net/p/elftoolchain/tickets/472/

Sponsored by:	The FreeBSD Foundation
2015-01-02 20:49:43 +00:00
Baptiste Daroussin
2d2813618c Remove GNU texinfo from base along with all info pages.
To be able to info pages consider installing texinfo from ports print/texinfo or
via pkg: pkg install texinfo

Differential Revision:	https://reviews.freebsd.org/D1409
Reviewed by:	emaste, imp (previous version)
Relnotes:	yes
2015-01-02 18:45:03 +00:00
Dag-Erling Smørgrav
7954be7fa5 import unbound 1.5.1 2015-01-02 17:35:29 +00:00
Dag-Erling Smørgrav
d433784aff import unbound 1.5.0 2015-01-02 17:31:36 +00:00
Dimitry Andric
c956f15874 Add clang and llvm patches corresponding to r276516 and r276537. 2015-01-02 14:58:41 +00:00
Dimitry Andric
e5eac9539c Pull in r222587 from upstream llvm trunk (by Jörg Sonnenberger):
Fix transformation of add with pc argument to adr for non-immediate
  arguments.

This fixes an "Unimplemented" error when assembling certain ARM add
instructions with pc-relative arguments.

Reported by:	sbruno
PR:		196412, 196423
2015-01-02 14:55:02 +00:00
Enji Cooper
97e4ab0905 Don't install h_raw if dealing with clang 3.5.0+ to unbreak the tests2 Jenkins
job

The h_raw application doesn't do proper bounds checking without the option
being supplied via the build, which means that it doesn't throw signals and
fail as expected

PR: 196430
X-MFC with: r276479
2015-01-02 05:40:02 +00:00
Ed Maste
bc5438c566 libelf: Return an error instead of asserting on an invalid ar file
Upstream elftoolchain ticket 467
http://sourceforge.net/p/elftoolchain/tickets/467/

Reported by:	Alexander Cherepanov
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-01-02 02:47:47 +00:00
Enji Cooper
8fe9679fd6 Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the
tested errno isn't stale

This was needed in order for the test to pass on amd64 with stable/10

MFC after: 3 days
2015-01-02 00:57:40 +00:00
Dimitry Andric
fe3185864e Pull in r200010 from upstream libc++ trunk (by Marshall Clow):
Rename some internal templates to avoid conflict with complier
  intrinsics. __is_constructible --> __libcpp_is_constructible,
  __is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and
  __is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No
  functionality change.

Pull in r206805 from upstream libc++ trunk (by Marshall Clow):

  Use compiler intrinsic __is_constructible if available

This should fix building parts of world with -std=c++11 enabled.

Reported by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>
MFC after:	1 week
2015-01-01 22:49:17 +00:00
Dimitry Andric
f9d068d10d Pull in r213790 from upstream clang trunk (by Richard Smith):
PR20228: don't retain a pointer to a vector element after the
  container has been resized.

This fixes a possible crash when compiling certain parts of libc++'s
type_traits header.
2015-01-01 22:44:02 +00:00
Dimitry Andric
44b6c81fe4 Upgrade our copy of clang, llvm and lldb to 3.5.0 release.
Please note that this version now requires C++11 support to build; see
UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Andrew Turner, Justin Hibbits and
Antoine Brodin for their invaluable help with this import.

Approved by:	portmgr (antoine)
MFC after:	1 month
2014-12-31 20:31:32 +00:00
Ed Maste
3dc58d9cdb readelf: Add stdint.h for C99 fixed size types
Upstream elftoolchain brings in stdint.h via an ELF header that we
do not use in FreeBSD.

Sponsored by:	The FreeBSD Foundation
2014-12-31 19:21:53 +00:00
Dimitry Andric
ccd2f3b61a Merge ^/head r274961 through r276472. 2014-12-31 16:50:46 +00:00
Ed Maste
47fc54d8b0 libelf: Rearrange size test to prevent integer overflow
Sponsored by:	The FreeBSD Foundation
2014-12-31 01:48:23 +00:00
Enji Cooper
3e4930b0a9 Expect access_test:access_inval to fail before __FreeBSD_version == 1100033
This will allow me to MFC the test, as jilles@ requested that I don't MFC the
access(2) KBI change to 10-STABLE in r271655
2014-12-30 22:32:29 +00:00
Ed Maste
6db8a9f3a5 Check for multiplication integer overflow in CHECK_EHDR
The initial fix in r276374 is valid only for 64-bit objects. Revert it
and return an error in CHECK_EHDR if the multiplication would overflow.

The original buffer overflow issue was found with the security/afl
fuzzer and has upstream elftoolchain ticket 462. The 32-bit object issue
with r276374 found by antoine@ during an i386 exp-run.

Sponsored by:	The FreeBSD Foundation
2014-12-30 22:04:24 +00:00
Dimitry Andric
3ed527f1b5 Merge ^/head r274961 through r276418. 2014-12-30 20:23:03 +00:00
Dimitry Andric
f2dc4184d2 Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.
Interesting fixes:
76584a0  Reorganize code to use only 32bit atomic ops for 32bit platforms
30d2ae5  Implement __cxa_throw_bad_array_new_length

Reviewed by:	bapt
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D1390
2014-12-30 20:01:06 +00:00
Ed Maste
4a85c69160 Update elftoolchain to upstream rev 3136
This fixes two strip(1) issues found during ports exp-run and adds a
string hash implementation which significantly speeds up certain
operations on objects with large numbers of symbols.

This also improves libdwarf handling for stripped objects with
.eh_frame or .debug_frame (but not other debug) sections.

PR:		196107
Sponsored by:	The FreeBSD Foundation
2014-12-30 03:25:42 +00:00
Ed Maste
3a6f20c19a libelf: Do not read past end of buffer
Previously a corrupt ELF file could read beyond the end of e_rawfile.

Upstream elftoolchain ticket 462.  Found via the security/afl fuzzer.

Sponsored by:	The FreeBSD Foundation
2014-12-29 20:23:42 +00:00
Ed Maste
2013b96e58 Rename DT_FEATURE_1 to DT_FEATURE
Track r270303:

  This provides a minor cleanup in elfdump; there are otherwise no
  consumers in the tree.  Old SUN documentation can be found for either
  variant, but GNU binutils switched to DT_FEATURE around 2000.

Sponsored by:	The FreeBSD Foundation
2014-12-29 19:38:12 +00:00
Ed Maste
4a9f54ac69 Restore r276252 mdoc fix
It was accidentally reverted in the elftoolchain update (r276371).

Sponsored by:	The FreeBSD Foundation
2014-12-29 19:27:10 +00:00
Ed Maste
b4e9f2392c Update elftoolchain to upstream rev 3130
This includes a number of libdwarf improvements (particularly DWARF4
related) and updates to elftoolchain tools such as strip(1). It also
includes a large number of miscellaneous fixes (memory leaks, sign and
cast warnings, integer overflow and underflow, etc.).

This is a merge of r276167,276170-276172 from the
projects/elftoolchain-update-r3130 branch.

Sponsored by:	The FreeBSD Foundation
2014-12-29 19:16:40 +00:00
Dimitry Andric
106370187a Merge ^/head r276347 through r276356. 2014-12-29 09:27:42 +00:00
Dimitry Andric
db39fc2a01 In contrib/binutils/bfd/elf32-ppc.c, avoid warnings about case values
not being in the enumerated type 'enum elf_ppc_reloc_type', by casting
the switch argument to int.

MFC after:	3 days
2014-12-29 00:10:43 +00:00
Dimitry Andric
81ccdbbb57 Merge ^/head r274961 through r276346. 2014-12-28 21:13:55 +00:00
Dimitry Andric
efabc957c5 In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-security
warnings.

MFC after:	3 days
2014-12-28 21:06:03 +00:00
Dimitry Andric
eca4d50aaa Merge ^/head r274961 through r276342. 2014-12-28 20:02:06 +00:00
Dimitry Andric
55b7c2bcf9 Add llvm patches corresponding to r276300, r276301 and r276324. 2014-12-28 02:33:13 +00:00
Dimitry Andric
c1ddc1e628 Pull in r224890 from upstream llvm trunk (by David Majnemer):
PowerPC: CTR shouldn't fire if a TLS call is in the loop

  Determining the address of a TLS variable results in a function call in
  certain TLS models.  This means that a simple ICmpInst might actually
  result in invalidating the CTR register.

  In such cases, do not attempt to rely on the CTR register for loop
  optimization purposes.

  This fixes PR22034.

  Differential Revision: http://reviews.llvm.org/D6786

This fixes a "Invalid PPC CTR loop" error when compiling parts of libc
for PowerPC-32.
2014-12-28 02:30:03 +00:00
Enji Cooper
e3ee0494af Fix the function signatures when MK_CRYPT == no for snmp_get_local_keys and
snmp_passwd_to_keys

MFC after: 1 week
Reported by: Beeblebrox <zaphod@berentweb.com>
2014-12-27 20:58:01 +00:00
Dimitry Andric
8007ee2b0c Merge ^/head r274961 through r276301. 2014-12-27 14:58:52 +00:00
Dimitry Andric
630590abbc Pull in r221703 from upstream llvm trunk (by Bill Schmidt):
[PowerPC] Replace foul hackery with real calls to __tls_get_addr

  My original support for the general dynamic and local dynamic TLS
  models contained some fairly obtuse hacks to generate calls to
  __tls_get_addr when lowering a TargetGlobalAddress.  Rather than
  generating real calls, special GET_TLS_ADDR nodes were used to wrap
  the calls and only reveal them at assembly time.  I attempted to
  provide correct parameter and return values by chaining CopyToReg and
  CopyFromReg nodes onto the GET_TLS_ADDR nodes, but this was also not
  fully correct.  Problems were seen with two back-to-back stores to TLS
  variables, where the call sequences ended up overlapping with unhappy
  results.  Additionally, since these weren't real calls, the proper
  register side effects of a call were not recorded, so clobbered values
  were kept live across the calls.

  The proper thing to do is to lower these into calls in the first
  place.  This is relatively straightforward; see the changes to
  PPCTargetLowering::LowerGlobalTLSAddress() in PPCISelLowering.cpp.
  The changes here are standard call lowering, except that we need to
  track the fact that these calls will require a relocation.  This is
  done by adding a machine operand flag of MO_TLSLD or MO_TLSGD to the
  TargetGlobalAddress operand that appears earlier in the sequence.

  The calls to LowerCallTo() eventually find their way to
  LowerCall_64SVR4() or LowerCall_32SVR4(), which call FinishCall(),
  which calls PrepareCall().  In PrepareCall(), we detect the calls to
  __tls_get_addr and immediately snag the TargetGlobalTLSAddress with
  the annotated relocation information.  This becomes an extra operand
  on the call following the callee, which is expected for nodes of type
  tlscall.  We change the call opcode to CALL_TLS for this case.  Back
  in FinishCall(), we change it again to CALL_NOP_TLS for 64-bit only,
  since we require a TOC-restore nop following the call for the 64-bit
  ABIs.

  During selection, patterns in PPCInstrInfo.td and PPCInstr64Bit.td
  convert the CALL_TLS nodes into BL_TLS nodes, and convert the
  CALL_NOP_TLS nodes into BL8_NOP_TLS nodes.  This replaces the code
  removed from PPCAsmPrinter.cpp, as the BL_TLS or BL8_NOP_TLS
  nodes can now be emitted normally using their patterns and the
  associated printTLSCall print method.

  Finally, as a result of these changes, all references to get-tls-addr
  in its various guises are no longer used, so they have been removed.

  There are existing TLS tests to verify the changes haven't messed
  anything up).  I've added one new test that verifies that the problem
  with the original code has been fixed.

This fixes a fatal "Bad machine code" error when compiling parts of
libgomp for 32-bit PowerPC.
2014-12-27 14:50:53 +00:00
Dimitry Andric
1ee9c19fb9 Pull in r213890 from upstream llvm trunk (by Jörg Sonnenberger):
Use the same .eh_frame encoding for 32bit PPC as on i386.

This fixes DT_TEXTREL errors when linking C++ objects using exceptions
on PowerPC.
2014-12-27 14:38:15 +00:00
Alfred Perlstein
628a446c66 Output strerror from xo_warn
Reported by: bapt
Reviewed by: bapt, ngie

Differential Revision: https://reviews.freebsd.org/D1378
2014-12-27 01:06:19 +00:00
Baptiste Daroussin
6fbbb9be44 Escape Do to prevent mdoc(7) parser to get confused with the "Do" macro
Reported by:	sjg
2014-12-26 22:34:15 +00:00
Baptiste Daroussin
6047eb6e49 mdoc fixes 2014-12-26 20:57:10 +00:00
Baptiste Daroussin
e66fe60d56 mdoc fixes 2014-12-26 20:50:40 +00:00
Baptiste Daroussin
df7f007fe8 mdoc fixes 2014-12-26 20:49:23 +00:00
Hans Petter Selasky
d0bd125135 Add proper Makefiles to build some infiniband example utilities.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2014-12-26 10:25:34 +00:00
Baptiste Daroussin
445ed7b409 Remove unknown macro 2014-12-26 07:36:42 +00:00
Baptiste Daroussin
e3fe6b9488 Fix .TH having too many arguments 2014-12-26 07:34:42 +00:00
Pedro F. Giffuni
e63365a089 Backport fix for binutils 11867: .quad directive not assembled correctly
Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.

Obtained from:	OpenBSD
MFC after:	5 days
2014-12-26 04:33:53 +00:00
Pedro F. Giffuni
32d0bb7e1b gas: use memmove instead of bogus memcpy.
partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Sourceware-PR 11456.

Obtained from:	OpenBSD (CVS rev. 1.2)
MFC after:	3 days
2014-12-26 03:03:41 +00:00
Dimitry Andric
7b4faa6c04 Add llvm patches corresponding to r276211 and r276223. 2014-12-26 00:10:08 +00:00
Dimitry Andric
c47b215d21 Pull in r224415 from upstream llvm trunk (by Justin Hibbits):
Add parsing of 'foo@local".

  Summary:
  Currently, it supports generating, but not parsing, this expression.
  Test added as well.

  Test Plan: New test added, no regressions due to this.

  Reviewers: hfinkel

  Reviewed By: hfinkel

  Subscribers: llvm-commits

  Differential Revision: http://reviews.llvm.org/D6672

Pull in r224494 from upstream llvm trunk (by Justin Hibbits):

  Add a corresponding '@LOCAL' parse to match r224415.

  Pointed out by Jim Grosbach.
2014-12-25 23:57:31 +00:00
Dimitry Andric
c26ad6e55e Amend r276211 for the new PowerPC relocation types that were added
there.  (Upstream is now using a generated file for this, so there is no
direct upstream commit associated with this change.)
2014-12-25 23:54:57 +00:00
Baptiste Daroussin
47ed86a875 Update mandoc to 1.13.2 2014-12-25 21:56:56 +00:00
Dimitry Andric
404df5bbd5 Pull in r214284 from upstream llvm trunk (by Hal Finkel):
[PowerPC] Add JMP_SLOT relocation definitions

  This will be required by upcoming patches for LLDB support.

  Patch by Justin Hibbits!

Pull in r221510 from upstream llvm trunk (by Justin Hibbits):

  Add Position-independent Code model Module API.

  Summary:
  This makes PIC levels a Module flag attribute, which can be queried by the
  backend.  The flag is named `PIC Level`, and can have a value of:

    0 - Backend-default
    1 - Small-model (-fpic)
    2 - Large-model (-fPIC)

  These match the `-pic-level' command line argument for clang, and the value of the
  preprocessor macro `__PIC__'.

  Test Plan:
  New flags tests specific for the 'PIC Level' module flag.
  Tests to be added as part of a future commit for PowerPC, which will use this new API.

  Reviewers: rafael, echristo

  Reviewed By: rafael, echristo

  Subscribers: rafael, llvm-commits

  Differential Revision: http://reviews.llvm.org/D5882

Pull in r221791 from upstream llvm trunk (by Justin Hibbits):

  Add support for small-model PIC for PowerPC.

  Summary:
  Large-model was added first.  With the addition of support for multiple PIC
  models in LLVM, now add small-model PIC for 32-bit PowerPC, SysV4 ABI.  This
  generates more optimal code, for shared libraries with less than about 16380
  data objects.

  Test Plan: Test cases added or updated

  Reviewers: joerg, hfinkel

  Reviewed By: hfinkel

  Subscribers: jholewinski, mcrosier, emaste, llvm-commits

  Differential Revision: http://reviews.llvm.org/D5399

Together, these changes implement small-model PIC support for PowerPC.

Thanks to Justin Hibbits and Roman Divacky for their assistance in
getting this working.
2014-12-25 18:22:22 +00:00
Dimitry Andric
42ac84b368 Remove doubled patch, which snuck in with the last merge from head. 2014-12-25 16:58:48 +00:00
Ed Maste
cf781b2e16 Update elftoolchain to upstream rev 3130
This brings a number of fixes to elfcopy/strip and DWARF4 improvements.

Sponsored by:	The FreeBSD Foundation
2014-12-24 03:13:16 +00:00
Xin LI
2f834a0b41 Fix multiple ntp vulnerabilities.
Reviewed by:	roberto (earlier revision), philip
Security:	CVE-2014-9293, CVE-2014-9294
Security:	CVE-2014-9295, CVE-2014-9296
Security:	FreeBSD-SA-14:31.ntp

Differential Revision: https://reviews.freebsd.org/D1343
2014-12-22 18:54:55 +00:00
Ed Maste
b3f2680928 Add AArch64 machine time and relocations for readelf
Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1333
2014-12-22 16:34:59 +00:00
Ed Maste
9ef62fdb87 Set up default shstrtab entries at shstrtab initialization
Instead of waiting until the addition of the first non-default entry.
This fixes a segfault when strip(1) is asked to remove every section from
an object file.

Upstream elftoolchain ticket 463

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1341
2014-12-22 16:31:09 +00:00
Enji Cooper
92e8bbfdfd Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
stable/10

It was added when __FreeBSD_version was ~1100027
2014-12-21 23:47:30 +00:00
Ian Lepore
040610408e Allow -march=armv7a on the gcc command line, for compatibility with clang.
This will result in __ARM_ARCH_7A__ being defined during the compile.

When compiling with gcc, it will still only generate armv6 opcodes itself,
but should pass the arch to gas so that inline asm can use v7 opcodes.
2014-12-21 23:45:13 +00:00
Ed Maste
17eee5222e Include section name in strip warning message 2014-12-18 19:09:59 +00:00
Dimitry Andric
e65720e1ac Merge ^/head r275759 through r275911. 2014-12-18 18:44:22 +00:00
Justin Hibbits
e5701220a8 Make gas parse '__tls_get_addr(foo@tlsgd)'.
Corresponds to 727fc41e077139570ea8b8ddfd6c546b2a55627c.

This allows us to use -no-integrated-as with clang, if we prefer.

Obtained from:	binutils-gdb (Relicensed from Alan Modra as GPLv2)
MFC after:	2 weeks
X-MFC-with:	r275718
2014-12-18 03:12:46 +00:00
Ed Maste
a356a1f51f Do not strip all when stripping an explicit symbol
When requested to strip specific symbols (-N flag) the default should be
to strip nothing (other than the requested symbols). This is consistent
with binutils strip(1).

PR:		196038
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1327
2014-12-17 14:46:21 +00:00
Xin LI
52df462f7f MFV r275844:
Fix unbound remote denial of service vulnerability.

Security:	FreeBSD-SA-14:30.unbound
Security:	CVE-2014-8602
2014-12-17 06:55:44 +00:00
Ed Maste
2c23cb7c27 Copy elftoolchain readelf from vendor branch 2014-12-16 16:23:54 +00:00
Ed Maste
30568ad37e Correct elftoolchain strip(1) memory size calculation
Calculate the segment's memory size (p_memsz) using the virtual
addresses, not the file offsets. Otherwise padding preceeding SHT_NOBITS
sections may be excluded from the calculation, resulting in a segment
that is too small.

PR:		195653
Sponsored by:	The FreeBSD Foundation
2014-12-15 18:18:57 +00:00
Dimitry Andric
580210532a Add clang patch corrsponding to r275773. 2014-12-14 18:21:03 +00:00
Dimitry Andric
01a314e59a Pull in r221170 from upstream clang trunk (by Roman Divacky):
Implement vaarg lowering for ppc32. Lowering of scalars and
  aggregates is supported. Complex numbers are not.

This adds va_args support for PowerPC (32 bit) to clang.
2014-12-14 18:20:03 +00:00
Dimitry Andric
f843434e37 Update clang patch for r275759 to use correct test cases. 2014-12-14 18:16:49 +00:00
Dimitry Andric
be038cc81f Add clang patch corresponding to r275759. 2014-12-14 13:40:42 +00:00
Dimitry Andric
b567315ffc Pull in r221170 from upstream clang trunk (by Roman Divacky):
Implement vaarg lowering for ppc32. Lowering of scalars and
  aggregates is supported. Complex numbers are not.

This adds va_args support for PowerPC (32 bit) to clang.

Reviewed by:	jhibbits
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1308
2014-12-14 13:38:10 +00:00
Dimitry Andric
b7f7b09969 Update patch-r274286-llvm-r201784-asm-dollar.diff, so
test/MC/AsmParser/macros.s is properly deleted when patching.
2014-12-14 13:32:14 +00:00
Dimitry Andric
60d2871897 Update llvm patch for r275635 so all the tests will pass. 2014-12-13 20:17:54 +00:00
Dimitry Andric
be281d7007 Merge ^/head r275715 through r275748. 2014-12-13 19:45:18 +00:00
Dimitry Andric
e5141ad104 Update llvm patches for r274286 and r275633 so all the tests will pass. 2014-12-13 18:54:46 +00:00
Justin Hibbits
ff0bab9760 Add new PowerPC relocations to binutils
Summary:
LLVM/Clang generates relocations that our binutils doesn't understand, but newer
binutils does.  I got permission from the author of a series of patches to
relicense them as GPLv2 for use in FreeBSD.  The upstream git hashes are:

ac2df442ac7901f00af15b272fc48b594b433713
2b95367962dc14f69d3c338c4d54195266e2e169
102890f04c44b64cf5cef4588267dd9f24086ac7
b7fcf6f6bb53b5027e111107f5416769cb9a5798
1d483afedd5a628dc84fb58d1d570f79fdfbfa7b
90aecf7a80c1cefeb45fc10a6cd02c8338e34b4c
3a71aa26df2a372a58e9c11ef9ba51fd0e83320a
727fc41e077139570ea8b8ddfd6c546b2a55627c

With the import of clang 3.5, and a few backported patches, we should be able to
move powerpc and powerpc64 to clang-as-cc soon.

Test Plan: Passes make tinderbox, so no regressions.  Binaries built with clang
run on powerpc64.

Reviewers: #committers, dim

Reviewed By: dim

Differential Revision: https://reviews.freebsd.org/D1297

Obtained from:	Alan Modra, upstream binutils-gdb git
MFC after:	3 weeks
Relnotes:	yes
2014-12-12 03:58:51 +00:00