aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-06-18 11:53:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-10-07 10:26:08 -0700
commit1bd888d0b705fa5ab7b443724288f7ba12939533 (patch)
tree166dd3a513e03da33dfad8b580b8f415db93b91d /elf
parent1836bb2ebf62bd9a3588f2ed2d851c8ae810097a (diff)
downloadglibc-1bd888d0b705fa5ab7b443724288f7ba12939533.tar
glibc-1bd888d0b705fa5ab7b443724288f7ba12939533.tar.gz
glibc-1bd888d0b705fa5ab7b443724288f7ba12939533.tar.bz2
glibc-1bd888d0b705fa5ab7b443724288f7ba12939533.zip
Initial support for GNU_PROPERTY_1_NEEDED
1. Add GNU_PROPERTY_1_NEEDED: #define GNU_PROPERTY_1_NEEDED GNU_PROPERTY_UINT32_OR_LO to indicate the needed properties by the object file. 2. Add GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS: #define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS (1U << 0) to indicate that the object file requires canonical function pointers and cannot be used with copy relocation. 3. Scan GNU_PROPERTY_1_NEEDED property and store it in l_1_needed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf')
-rw-r--r--elf/elf.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/elf/elf.h b/elf/elf.h
index 4738dfa28f..50f87baceb 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1312,6 +1312,23 @@ typedef struct
/* No copy relocation on protected data symbol. */
#define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
+/* A 4-byte unsigned integer property: A bit is set if it is set in all
+ relocatable inputs. */
+#define GNU_PROPERTY_UINT32_AND_LO 0xb0000000
+#define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff
+
+/* A 4-byte unsigned integer property: A bit is set if it is set in any
+ relocatable inputs. */
+#define GNU_PROPERTY_UINT32_OR_LO 0xb0008000
+#define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff
+
+/* The needed properties by the object file. */
+#define GNU_PROPERTY_1_NEEDED GNU_PROPERTY_UINT32_OR_LO
+
+/* Set if the object file requires canonical function pointers and
+ cannot be used with copy relocation. */
+#define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS (1U << 0)
+
/* Processor-specific semantics, lo */
#define GNU_PROPERTY_LOPROC 0xc0000000
/* Processor-specific semantics, hi */