History log of /bionic/tools/versioner/current/elf.h
Revision Date Author Comments
45a93c13bfa15e8621010570bb98aaee8c5803fc 24-Mar-2018 Elliott Hughes <enh@google.com> Reject .so files using ELF TLS.

Bug: http://b/74361956
Test: ran tests

(cherry picked from commit 9724e93c196d0dbaa0e60bf45c29971a22da50c9)

Change-Id: I287c926951c337aacd2246940a1e6474e4c661e1
f16b65932bb7adb1568a3a1e11ffa750d18e30ae 26-Jan-2018 Rahul Chaudhry <rahulchaudhry@google.com> linker: simpler encoding for SHT_RELR sections.

This change modifies the encoding used in SHT_RELR sections to a simpler
version that gives better results. This encoding was suggested by Andrew
Grieve and is described in this post on generic-abi@googlegroups.com:
https://groups.google.com/d/msg/generic-abi/bX460iggiKg/Pi9aSwwABgAJ

Bug: None
Test: Built image for marlin, flashed on device, ran arm and
aarch64 binaries containing '.relr.dyn' sections using
the new encoding.

Change-Id: I266affe0fbad91dc375995985a221cb02499447b
b7feec74547f84559a1467aca02708ff61346d2a 20-Dec-2017 Rahul Chaudhry <rahulchaudhry@google.com> linker: add experimental support for SHT_RELR sections.

This change adds experimental support for SHT_RELR sections, proposed
here: https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg

Definitions for the new ELF section type and dynamic array tags, as well
as the encoding used in the new section are all under discussion and are
subject to change. Use with caution!

Bug: None
Test: Built image for marlin, flashed on device, ran arm and
aarch64 binaries containing '.relr.dyn' sections.

Change-Id: I2953ae932d3c42ae394e71f8fa058013758a1778
89d8a3c4cd0ea2d0b687851eda880c3050841029 05-Dec-2017 Elliott Hughes <enh@google.com> Add more missing ELF structures/constants.

Needed to build libelf.

Bug: N/A
Test: builds
Change-Id: If0c5e633547a1f4bd8e5d77ffb815739f13c641f
a8a23f520e1728a1ede6bf1b775bc30a0f8f13f2 01-Nov-2017 Elliott Hughes <enh@google.com> Add missing ELF constants from the spec.

Also add links to the relevant documentation.

Bug: N/A
Test: builds
Change-Id: I65b1a1ec0c63e1f07749ab4e4b0cf3905acc1df7
8874d880839761bf722b5a025940823172894c0a 31-Oct-2017 Greg Hackmann <ghackmann@google.com> elf.h: add STN_UNDEF

ELF uses index STN_UNDEF = 0 for undefined symbols. glibc and musl
define this constant in elf.h, and it's needed to build the kernel's
vDSO selftest suite.

Test: Overwrite elf.h in standalone NDK toolchain, then
cd $kernel/tools/testing/selftests/vDSO && \
make CC="aarch64-linux-android-gcc -pie" vdso_test
Change-Id: I495586e9ca43d2f0d148ded9f4bd61ec8d14d53b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
d390df1dbc038843889946555c3ea53548dcab5d 01-May-2017 Elliott Hughes <enh@google.com> Restore ELF32_ST_INFO/ELF64_ST_INFO.

Mistakenly removed years ago, along with its genuinely duplicated companions.
This patch also redefines one of those rather than use the Linux uapi header
definition, which leads to signed/unsigned warnings in calling code.

Bug: https://github.com/android-ndk/ndk/issues/377
Test: ran tests
Change-Id: Ib25b17949f04969f12b945ca88ab87d080677cf9
5109bb463d3cce67a68875dec3cba9cb0b861ecd 19-Apr-2017 Elliott Hughes <enh@google.com> Make all the ELF relocation constants available.

BSD thinks you should only get the relocation constants for your target
architecture, but it's often useful to have them all available at once.
Rearrange the headers to enable that.

Also update the (modified) NetBSD files to CVS HEAD.

Also remove the unused BSDism R_TYPE.

Bug: N/A
Test: builds
Change-Id: Iad5ef29192a732696e2b36af35144a9ca116aa46
0446c8c095044d47217a59a9fd707fc8ed23b6fc 19-Apr-2017 Elliott Hughes <enh@google.com> Add missing arch-specific AT_ cruft.

AP_FPUCW is referenced by valgrind.

Bug: https://bugs.kde.org/show_bug.cgi?id=339945
Test: valgrind builds with one less hack
Change-Id: I7146f3709286662108cc82ba3c55ce935375a1f1
3914b19bd4a2707ed5274a502fd9fc5538a5d26c 18-Apr-2017 Dan Albert <danalbert@google.com> Add PT_ARM_EXIDX.

The updated LLVM libunwind needs this to be defined.

Test: make checkbuild
Bug: None
Change-Id: Ia20016a9e3becb37ea6902f1959d1884c1263e51
16016df79f846d6d21266c3b1dce1e7c24dc4be1 08-Nov-2016 Josh Gao <jmgao@google.com> versioner: refactor to use CompilerInstance directly.

This will make it easier to switch over to a virtual filesystem,
which should drastically improve performance.

This also fixes an issue with warning/error reporting.

Bug: http://b/32748936
Test: python run_tests.py
Change-Id: I2e967acf75db29c95f3a03f4f94cccd22c367ad5
203e13d97de840e01eded6a267fef9f245cf3a15 22-Jul-2016 Elliott Hughes <enh@google.com> Always include <sys/cdefs.h>.

I made a mistake caught by code review earlier, so let's try to be
safer by default.

This patch also moves all our "forwarding" headers to the guardless
just-include-the-other-thing style that we usually use. (Where we
have a comment explaining where the header comes from, I've kept
that.)

Change-Id: I37342cf5e2563c6a269b2ba61a697069b1c7913b
f41ed6e5490864e625c6c3d05d86e3c490602cad 08-May-2015 Dmitriy Ivanov <dimitry@google.com> Add definitions of Elf32_Sxword and ELFXX_R_INFO

Bug: http://b/17056684
Change-Id: If35302245ac3ab40d1c80fb2b04620778c114f87
(cherry picked from commit ce16a53d393512336f30c21a244afd70b7d57cf6)
ce16a53d393512336f30c21a244afd70b7d57cf6 08-May-2015 Dmitriy Ivanov <dimitry@google.com> Add definitions of Elf32_Sxword and ELFXX_R_INFO

Bug: http://b/17056684
Change-Id: If35302245ac3ab40d1c80fb2b04620778c114f87
456afe24b6460f75b3abc296f8f5885f4d8d907a 05-May-2015 Dmitriy Ivanov <dimitry@google.com> Fix protected symbol lookups for mips

Bug: http://b/20694161
Change-Id: I5cc58034f9776e1db9cddc34abe48ef85f6048f4
(cherry picked from commit dbe26fdcc7de503539837467299b96c4a93084cc)
dbe26fdcc7de503539837467299b96c4a93084cc 05-May-2015 Dmitriy Ivanov <dimitry@google.com> Fix protected symbol lookups for mips

Bug: http://b/20694161
Change-Id: I5cc58034f9776e1db9cddc34abe48ef85f6048f4
2a815361448d01b0f4e575f507ce31913214c536 09-Apr-2015 Dmitriy Ivanov <dimitry@google.com> Support symbol versioning

Bug: http://b/20139821
Change-Id: I64122a0fb0960c20b2ce614161b7ab048456b681
c0e7dbb1dbe92c9e72bdbd299fa50786fd751807 09-Apr-2015 Dmitriy Ivanov <dimitry@google.com> Add Elfxx_Ver* types

Bug: http://b/20139821
Change-Id: I7a367b08faa3bf5c005996c066cd35709f533265
c94c7ff2bb7cdc8638d2155b8eefd8e2538eea50 13-Mar-2015 Christopher Ferris <cferris@google.com> Add some GNU specific elf constants.

Change-Id: I6c668463a27a641c9a280ce1937857d622344ff8
18a6956b76a071097fc658c5fe13ef010e31864a 05-Feb-2015 Dmitriy Ivanov <dimitry@google.com> Add support for packed relocations.

Change-Id: I796a4ce86d3fccb8361c19889419c96147ee3c9f
13ed3f0af15ebd5b10aa44f8f51a5bba1b3bd9fc 14-Feb-2015 Dmitriy Ivanov <dimitry@google.com> Add missing SHT_LOOS/SHT_HIOS values

Change-Id: Ib0b0987a7e85af7863c6ef894263b5980e32344d
ec18ce06f2d007be40ad6f043058f5a4c7236573 10-Nov-2014 Dmitriy Ivanov <dimitry@google.com> Add support for hash-style=gnu

Change-Id: I171434a587420895feac8a9b1ad2342087197568
0f47d9c1ce3e75709f9d6ecb6b540bb518ee323a 30-Sep-2014 Dmitriy Ivanov <dimitry@google.com> 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
a6bee4df4cbb20a539a7553d74a5492528402b0f 13-Oct-2014 Dmitriy Ivanov <dimitry@google.com> Add glibc alias for NT_PRFPREG

Also fix comment style for DF_1_ constants

Change-Id: I7c3ed1d834f0a2b85ee8cc8016c79020955084f8
bd321c1106ed30a71d55d5c365335dfe552b0883 21-Aug-2014 Dmitriy Ivanov <dimitry@google.com> Run constructors before resolving ifunc functions

Bug: 17177284

(cherry picked from commit 9598b8c415e2fa9f240508185fe8c964b83f538d)

Change-Id: I2c9631ee1cd77f8cf95ec0216a35b605c8786454
31b88da8431096a6df276705046ca7a012fa3530 23-Jul-2014 Brigid Smith <brigidsmith@google.com> Added test for ifunc support in dynamic linker.

ifuncs now work in i386 and x86_64 when called in the same library as
well as in a different library.

Bug:6657325
(cherry picked from commit c5a13efa9bc4264be0a9a9e37c00633af01584ed)

Change-Id: I321d780bc2f9bd1baa749e1acacd2683aefe827b
6cdeb5234d7f4523fe9d83974f265d80f10512a6 30-Sep-2014 Dmitriy Ivanov <dimitry@google.com> 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
Change-Id: Iaad29cd52f5b2d7d2f785fb351697906dc1617d9
9598b8c415e2fa9f240508185fe8c964b83f538d 21-Aug-2014 Dmitriy Ivanov <dimitry@google.com> Run constructors before resolving ifunc functions

Bug: 17177284
Change-Id: I5714b9bc2d1ca8f8711806bfb68da3d524213e99
c5a13efa9bc4264be0a9a9e37c00633af01584ed 23-Jul-2014 Brigid Smith <brigidsmith@google.com> Added test for ifunc support in dynamic linker.

ifuncs now work in i386 and x86_64 when called in the same library as
well as in a different library.

Bug:6657325
Change-Id: Ic0c48b1b0a76cb90f36c20c79f68294cc3fd44a1
10cf0d8c1f06d528f173e837ee9b7eab14247d7a 11-Jul-2014 Elliott Hughes <enh@google.com> EM_ARM and EM_AARCH64 are now in the uapi header.

Change-Id: Ice73403daff75ea45b24e02351269f6c012df6c1
0266ae5f884d72da58f33a072e865ba131234a5e 11-Feb-2014 Elliott Hughes <enh@google.com> Switch <elf.h> over to linux uapi under the covers.

Remove the linker's reliance on BSD cruft and use the glibc-style
ElfW macro. (Other code too, but the linker contains the majority
of the code that needs to work for Elf32 and Elf64.)

All platforms need dl_iterate_phdr_static, so it doesn't make sense
to have that part of the per-architecture configuration.

Bug: 12476126
Change-Id: I1d7f918f1303a392794a6cd8b3512ff56bd6e487
1272dbd1d76c979358fff3beae9de0c1462345af 10-Jan-2014 Elliott Hughes <enh@google.com> Add NT_PRSTATUS to <elf.h>.

Needed by aarch64.

Bug: 12476126
Change-Id: I7764664459a06cf4f2a60e707bd968d321a78430
c620059479c47a78d57086d73726c9adc2f337ad 01-Oct-2013 Elliott Hughes <enh@google.com> Remove 32-bit assumptions from the ELF code.

Change-Id: I2c1f3d34c33685799aade8866eec44479ff9f963
2c5153b043b44e9935a334ae9b2d5a4bc5258b40 11-Jan-2013 Nick Kralevich <nnk@google.com> libc: add getauxval()

Add support for getauxval(). This method allows a program an easy way
to retrieve information from the kernel auxiliary vector, and will
hopefully replace other clumsy ways of accessing this same information.

This particular function was also added to glibc in glibc 2.16.
See the following URLs for more details.

* http://lwn.net/Articles/519085/
* http://www.gnu.org/software/libc/manual/html_node/Auxiliary-Vector.html

This change is a prerequisite for bug 7959813.

Bug: http://code.google.com/p/android/issues/detail?id=38441
Change-Id: Iba19d899df334bddc6f4899077ece2fc87564ea8
9921947e6fa4547c10f68281fc1a7ad72e11cf56 28-Feb-2012 Nick Kralevich <nnk@google.com> Eliminate duplicate constants

include/elf.h contains basically the same values as
linux/auxvec.h. Eliminate dups.

include/sys/exec_elf.h contains basically the same
values as linux/elf.h. Eliminate dups.

Change-Id: I66b8358161bb52223bb657f8f73ba28b324f4fa3
67e7a93844989a4ea4660e6cfb9613e486c6d352 28-Feb-2012 Nick Kralevich <nnk@google.com> Eliminate duplicate constants

include/elf.h contains basically the same values as
linux/auxvec.h. Eliminate dups.

include/sys/exec_elf.h contains basically the same
values as linux/elf.h. Eliminate dups.

Change-Id: I66b8358161bb52223bb657f8f73ba28b324f4fa3
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution