aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-08-25 09:42:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-06-22 06:04:17 -0700
commitdc14c8980672194a1b329b5c35a7f781bc04a3f5 (patch)
treee3d6a419510c587892d5ca8abf5a7a199cd640fc /include
parent6b1edb94fedc7103b4929354d27304d0bd756f49 (diff)
downloadgdb-users/hjl/sharable.zip
gdb-users/hjl/sharable.tar.gz
gdb-users/hjl/sharable.tar.bz2
Add PT_GNU_SHR/SHF_GNU_SHARABLE/SHN_GNU_SHARABLE_COMMON support to gas/ldusers/hjl/sharable
PT_GNU_SHR/SHF_GNU_SHARABLE/SHN_GNU_SHARABLE_COMMON are used to group data into a PT_GNU_SHR to improve performance on NUMA system.
Diffstat (limited to 'include')
-rw-r--r--include/bfdlink.h3
-rw-r--r--include/elf/common.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h
index b392d54..4d06344 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -433,6 +433,9 @@ struct bfd_link_info
--dynamic-list command line options. */
unsigned int dynamic: 1;
+ /* TRUE if sharables sections may be created. */
+ unsigned int sharable_sections: 1;
+
/* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
flags. */
unsigned int execstack: 1;
diff --git a/include/elf/common.h b/include/elf/common.h
index 087d876..111f206 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -440,6 +440,7 @@
#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
+#define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */
/* Program segment permissions, in program header p_flags field. */
@@ -523,6 +524,8 @@
are not to be further
relocated. */
+#define SHF_GNU_SHARABLE 0x01000000 /* sharable section */
+
/* Compression types */
#define ELFCOMPRESS_ZLIB 1 /* Compressed with zlib. */
#define ELFCOMPRESS_LOOS 0x60000000 /* OS-specific semantics, lo */
@@ -720,6 +723,9 @@
#define STT_LOPROC 13 /* Processor-specific semantics */
#define STT_HIPROC 15 /* Processor-specific semantics */
+/* Associated symbol is in common sharable */
+#define SHN_GNU_SHARABLE_COMMON (SHN_LOOS + 10)
+
/* The following constants control how a symbol may be accessed once it has
become part of an executable or shared library. */