11649 Commits

Author SHA1 Message Date
Dmitriy Ivanov
382e06ce8e Add dlfcn_test to glibc test suite.
Bug: 18186310

(cherry picked from commit eb27bbae8f0edc6b62ca2db73256c7fb53b9e9bf)

Change-Id: I1d608dfa12dbafbdcdb8bc6d818c5872404c19e0
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
e4bc6f026a Ignore DT_BIND_NOW (0x18)
Bug: 18186310
Bug: 17552334

(cherry picked from commit ea6eae182ad64312f80b9adddac511d8938e23e7)

Change-Id: I07d6f6fbb462fea329581d0da02f6d88be1c262f
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
1d3e81a9e7 Resolve "unused DT entry" warnings for x86_64
Bug: 18186310

(cherry picked from commit 513e29e16f16a6ffa1636ba282d599fd6b437aeb)

Change-Id: I1e4c5af2cdc09dc978c7a78fcdcf8796c919751e
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
c87f65d2cd Add RTLD_NODELETE flag support
Bug: 18186310
Bug: https://code.google.com/p/android/issues/detail?id=64069

(cherry picked from commit 1b20dafdbe65e43b9f4c95057e8482380833ea91)

Change-Id: Ic02eec22a7c322ece65eb40730a3404f611526b1
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
210ff1b27b Fix mips build
Bug: 18186310

(cherry picked from commit ecf532fa1cfe91ca946243c11ef154c602870ba6)

Change-Id: Ia12f2fa28c8cd3204eb7d6b4c7d872f4e81fb8ef
2014-10-31 17:04:00 -07:00
Dmitriy Ivanov
0f47d9c1ce Fix unused DT entry warnings.
DT_STRSZ Implement strtab boundary checks
 DT_FLAGS_1 Warn if flags other than DF_1_NOW|DF_1_GLOBAL are set

Bug: 17552334
Bug: 18186310

(cherry picked from commit 6cdeb5234d7f4523fe9d83974f265d80f10512a6)

Change-Id: I7ffc7bc600798308a77ad949a644949b64250ae2
2014-10-31 17:03:59 -07:00
Dmitriy Ivanov
f90e21004e Return has_DT_SYMBOLIC flag.
This reverts commit 8f61d991831f0ea515fa50a5c38dbbcfbab0dd28

 Despite the fact that static linker does all the work while linking
 -Bsymbolic executables, according to the SCO doc following DT_SYMBOLIC
 and DF_SYMBOLIC flags is still a requirement for the dynamic linker
 as well.

 (see http://www.sco.com/developers/gabi/2012-12-31/ch5.dynamic.html)

Bug: 18186310

(cherry picked from commit 96bc37f2e1093416a432135265fd7a4db6c3df17)

Change-Id: Ie217be4f3305d877066e4cfe91975ae1c7768330
2014-10-31 17:03:59 -07:00
Elliott Hughes
748fbe5c41 Fix a couple more cases of missing CLOEXEC.
The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.

Bug: 18186310

(cherry picked from commit 0dc39f9952c5e3a3121ea77357bb264ef0f8ded7)

Change-Id: I3e84488fc246f6c28cbd82e96d0cd4343a12c28a
2014-10-31 17:03:21 -07:00
Dmitriy Ivanov
d5eb10875a Temporary disable DL_WARNs for unused DT_*
Bug: 17552334
Bug: 18186310

(cherry picked from commit 1b77423eff21e916186fcb208f138e436e9f3052)

Change-Id: I8a9d05195a862bc287fff7156913606f0311b8bb
2014-10-31 17:02:14 -07:00
Dmitriy Ivanov
09608848ed Fix 64bit build
Bug: 18186310

(cherry picked from commit f240aa8089ea1574a7d799720efb66528f6ceb99)

Change-Id: Id46f1f9be90a17a58fb44d3540095c8c685c9726
2014-10-31 17:02:14 -07:00
Dmitriy Ivanov
634a045c5c Fix some unused DT_ warnings
* DT_PLTGOT - ignored for non-mips
 * DT_RELCOUNT/RELACOUNT - ignored
 * DT_RELENT/RELAENT - sanity checks
 * DT_SYMENT - sanity check
 * DT_SONAME - ignore for now.

Bug: 18186310

(cherry picked from commit 4a6e9a835a84aca965f0170f604381dae7f130be)

Change-Id: Ib40095f0770d65628fc7abac5a471378de35ebe7
2014-10-31 17:02:14 -07:00
Dmitriy Ivanov
b364d95380 Remove has_DT_SYMBOLIC flag
From the elf-spec: "Symbolically bound shared objects are
  identified by the .dynamic entry DT_SYMBOLIC. This tag is
  informational only; the runtime linker processes symbol
  lookups from these objects in the same manner as any
  other object."

Bug: 18186310

(cherry picked from commit 8f61d991831f0ea515fa50a5c38dbbcfbab0dd28)

Change-Id: I37024799ac8d1837993c8ae78780a448bedd6539
2014-10-31 17:02:13 -07:00
Dmitriy Ivanov
c85e82dde5 Fix dlsym() to take into account RTLD_GLOBAL/LOCAL
Symbols from libraries opened with RTLD_LOCAL (default)
  should not be visible via dlsym(RLTD_DEFAULT/RTLD_NEXT, .)

Bug: 17512583
Bug: 18186310

(cherry picked from commit e8ba50fe0d51fbefee1a8f5bb62bf51d841512c8)

Change-Id: Idf6bbe2233fb2bfc0c88677e7d1fc518fb3f7a8b
2014-10-31 17:02:13 -07:00
Dmitriy Ivanov
926797a8a9 Reformatting
No functional changes.

Bug: 18186310

(cherry picked from commit 6abf624d122bec8c80cc9fe1b692265bf1b28b1b)]

Change-Id: I0acf52d8ee7fe2d4f44bc832cbe9fabe1782f03f
2014-10-31 17:02:13 -07:00
Dmitriy Ivanov
eb46dd98ab am a334934f: am f33ad400: Merge "Fix symbol lookup order during relocation"
* commit 'a334934f66386ecdf3ec07daf0b651fcf3b8dcce':
  Fix symbol lookup order during relocation
2014-10-31 23:57:29 +00:00
Dmitriy Ivanov
a334934f66 am f33ad400: Merge "Fix symbol lookup order during relocation"
* commit 'f33ad400230fa1f16ba4501efb60a1b6035e06ca':
  Fix symbol lookup order during relocation
2014-10-31 23:54:20 +00:00
Dmitriy Ivanov
f33ad40023 Merge "Fix symbol lookup order during relocation" 2014-10-31 23:51:18 +00:00
Dmitriy Ivanov
c663c2ae3e am 703581a3: am 74c0ccd4: Merge "Use local copy of the library name on dlopen"
* commit '703581a3220123a4fc44acbf3a94c835a7cf5ed0':
  Use local copy of the library name on dlopen
2014-10-31 22:57:06 +00:00
Dmitriy Ivanov
703581a322 am 74c0ccd4: Merge "Use local copy of the library name on dlopen"
* commit '74c0ccd49b2f0a94078b565b60c10ecba1e9424e':
  Use local copy of the library name on dlopen
2014-10-31 22:51:38 +00:00
Dmitriy Ivanov
74c0ccd49b Merge "Use local copy of the library name on dlopen" 2014-10-31 22:47:25 +00:00
Dmitriy Ivanov
da8e591c39 Use local copy of the library name on dlopen
Bug: 18052100
Change-Id: Idbc2a3691db3b5525d4e9bca81d78d5f29bc438f
2014-10-31 14:23:34 -07:00
Dmitriy Ivanov
d225a5e652 Fix symbol lookup order during relocation
Relocate symbol against DF_1_GLOBAL shared libraries
  loaded before this shared library. This includes
  main executable, ld_preloads and other libraries
  that have DF_1_GLOBAL flag set.

Bug: 2643900
Bug: 15432753
Change-Id: Ia788748be59b739d1c7e62b978e7e255f9e65c7b
2014-10-31 11:39:51 -07:00
Dan Albert
64b5940bc3 am 653263a9: Only use <atomic> for C++11 and newer.
* commit '653263a96459c5c1811623bd84201c324a870280':
  Only use <atomic> for C++11 and newer.
2014-10-31 06:12:21 +00:00
Dan Albert
653263a964 Only use <atomic> for C++11 and newer.
Any pre-C++11 clients of stdatomic.h that use libc++ are being forced
over to <atomic>, which they don't have the language support to use.

Bug:17736764

Change-Id: I62445c1f2541410a1569498c09433c7196635537
(cherry picked from commit 3ce0769aa5f9a991af1d167f730d987dd002253c)
2014-10-30 13:22:34 -07:00
Elliott Hughes
20cc6b695a Merge remote-tracking branch 'goog/lmp-mr1-ub-dev' into manualmerge 2014-10-30 09:52:50 -07:00
Elliott Hughes
7256062f10 am 25f4bb98: am e38bf839: Merge "limits.h: add define for HOST_NAME_MAX"
* commit '25f4bb984cf9a27ebfac0e8f0ab5481ce3bebf15':
  limits.h: add define for HOST_NAME_MAX
2014-10-30 16:08:28 +00:00
Elliott Hughes
25f4bb984c am e38bf839: Merge "limits.h: add define for HOST_NAME_MAX"
* commit 'e38bf839837d11542e7d1deb00d81542a0ef55b7':
  limits.h: add define for HOST_NAME_MAX
2014-10-30 16:02:29 +00:00
Elliott Hughes
e38bf83983 Merge "limits.h: add define for HOST_NAME_MAX" 2014-10-30 15:56:44 +00:00
Yongqin Liu
0589777a33 limits.h: add define for HOST_NAME_MAX
according to the rules defined here:
    http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html
add the definition for HOST_NAME_MAX to limits.h file,
and set the default value to _POSIX_HOST_NAME_MAX as 255

Change-Id: Iddd5c6c569f4e0a14994c7a7c54985f3e7809fc4
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2014-10-30 10:59:24 +08:00
Elliott Hughes
b0693ec582 Merge changes I0feda6b2,I22d13fde,I49d7d09d,Ice490bfe into lmp-mr1-dev
* changes:
  Fix the type of u_ar0 in <sys/user.h>.
  Add greg_t for arm64.
  POSIX says <signal.h> gets you ucontext_t.
  Add in_port_t and move it and in_addr_t to the correct header file.
2014-10-29 23:22:30 +00:00
Elliott Hughes
3d50e8efde am 4c29b1c2: am f362e9fb: Merge "Remove an unused file."
* commit '4c29b1c266aa7ac81a7b67a6170f52c12aca712d':
  Remove an unused file.
2014-10-29 20:56:29 +00:00
Elliott Hughes
4c29b1c266 am f362e9fb: Merge "Remove an unused file."
* commit 'f362e9fb33722f89cebe65ddf2f07d2b07e4390e':
  Remove an unused file.
2014-10-29 20:51:27 +00:00
Elliott Hughes
f362e9fb33 Merge "Remove an unused file." 2014-10-29 20:46:31 +00:00
Elliott Hughes
39cd0fa24a Remove an unused file.
We don't have any FreeBSD stdio left.

Bug: 17154680
Change-Id: I145627f564364ac8d4707d431d451cc3115c1c6a
2014-10-29 13:42:23 -07:00
Elliott Hughes
0eca547209 am 24464b04: am d50495a5: Merge "Extra strtod/strtof tests."
* commit '24464b04a0d5a7645b8e751c6a9ef0c6574d52c2':
  Extra strtod/strtof tests.
2014-10-29 20:42:10 +00:00
Yabin Cui
c62f0d7c60 am 63edd69e: am cbb4606a: Merge "change unsigned int to uint32_t for api arc4random/arc4random_uniform"
* commit '63edd69e576a9f1faebc493bc6d4e4729c70b02c':
  change unsigned int to uint32_t for api arc4random/arc4random_uniform
2014-10-29 19:42:32 +00:00
Elliott Hughes
654c781195 am 91bfaed2: am 13dcb88b: Merge "Disable tzdata in ."
* commit '91bfaed26a1e4595c387a27a789a71ec0eebfa73':
  Disable tzdata in $ANDROID_DATA.
2014-10-29 19:42:31 +00:00
Elliott Hughes
e3c9f21eaf resolved conflicts for merge of 912fe0a6 to lmp-mr1-dev-plus-aosp
Change-Id: Ie1cc84f34ccaf27eae4f3c292d67d44a9f0276bc
2014-10-29 12:38:36 -07:00
Elliott Hughes
0c4e98adbe Fix the type of u_ar0 in <sys/user.h>.
(cherry picked from commit e03950fa0c5567edf70d011b856a027e03b1c0f7)

Bug: 18172268
Change-Id: I0feda6b253882f68f47bcf30fad998286cc7f620
2014-10-29 11:57:36 -07:00
Elliott Hughes
d0fb6a2940 Add greg_t for arm64.
This was already present for the other architectures. I think we skipped
this because glibc seems to have an incorrect definition (int rather than
long), but the kernel has the sane definition (just not in a uapi header).

(cherry picked from commit 8e4d371091e5738346f5c6ad395b8487c2a5ec67)

Bug: 18172268
Change-Id: I22d13fdeb6431ea122dd028a229782dcaf2286b2
2014-10-29 11:56:59 -07:00
Elliott Hughes
ab4d5cf242 POSIX says <signal.h> gets you ucontext_t.
POSIX also says that ucontext_t's uc_sigmask has type sigset_t.

MIPS64 strace needs this.

The #define is to keep chromium off our lawn; otherwise it tries to redefine
all this stuff itself. We should probably clean that up and remove the #define.

(cherry picked from commit 26a8eb50a84e131d34d10d5d167d67e9995399bd)

Bug: 18172268
Change-Id: I49d7d09dabfc6c6926a8e1f4b235d041e2f2fc4d
2014-10-29 11:55:02 -07:00
Elliott Hughes
eedbf70e8e Add in_port_t and move it and in_addr_t to the correct header file.
No one's reported this, but I saw it in an Android port of fuser(1).

We still have lots of problems in our network headers because we
get most of the structs direct from the kernel, and it doesn't use
types like this (which is why we've got away without this one for
so long). One day we should probably look at cleaning that up, but
doing so can wait.

(cherry picked from commit 35d226e05d92824c6eb992e7a64ea22efc8bae03)

Bug: 18172268
Change-Id: Ice490bfe84afb04722d738128053d4c533b8a664
2014-10-29 11:49:45 -07:00
Christopher Ferris
98d57c95bc Add stpcpy assembler version.
For generic, continue to use the C version of the code.

Bug: 13746695

(cherry picked from commit 7d849ac378515efa1522e538e6e1d3b546cae97d)

Change-Id: Iae44785f37f9bb59103ab78fb9f74c92f8a95c7f
2014-10-29 11:07:03 -07:00
Elliott Hughes
3834e0fd68 am 382938d0: am ec58e29b: Merge "pthread_setname_np appears in glibc 2.12."
* commit '382938d092c7427a74ae8a6507bbd49f01e5c2f9':
  pthread_setname_np appears in glibc 2.12.
2014-10-29 17:46:53 +00:00
Elliott Hughes
91e5674c34 am 7dbb1cff: am 021b6412: Merge "Fix the type of u_ar0 in <sys/user.h>."
* commit '7dbb1cff0b40b4f6a2792b73f24ac912cfe121d5':
  Fix the type of u_ar0 in <sys/user.h>.
2014-10-29 17:46:53 +00:00
Elliott Hughes
a4402ef6e6 am ee8faa5e: am 7f164f60: Merge "POSIX says pthread_mutex_trylock returns EBUSY, not EDEADLK."
* commit 'ee8faa5e74eadc12231f59f2bbe13cfa644922cd':
  POSIX says pthread_mutex_trylock returns EBUSY, not EDEADLK.
2014-10-29 17:46:52 +00:00
Elliott Hughes
24464b04a0 am d50495a5: Merge "Extra strtod/strtof tests."
* commit 'd50495a56760fdc116b7484bcdf1183c76db9b37':
  Extra strtod/strtof tests.
2014-10-29 17:36:16 +00:00
Elliott Hughes
d50495a567 Merge "Extra strtod/strtof tests." 2014-10-29 17:22:33 +00:00
Dmitriy Ivanov
f63ce364a4 am 3a3a4b8a: am e23f564b: Merge "Fix *tests-run-on-host target"
* commit '3a3a4b8ae6c03b58c59717ab3c3be85099939d3b':
  Fix *tests-run-on-host target
2014-10-29 17:13:49 +00:00
Elliott Hughes
6ede5d1f24 am 44331e8b: am c716dd1e: Merge "bionic tests: migrate test for mutex type from system/extras"
* commit '44331e8bb0ba17be0387e9353d2309f980136273':
  bionic tests: migrate test for mutex type from system/extras
2014-10-29 17:13:49 +00:00