summaryrefslogtreecommitdiffhomepage
path: root/ir/be/begnuas.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-09-07 03:02:39 +0200
committerMatthias Braun <matze@braunis.de>2015-09-07 04:17:29 +0200
commitaba0611e4da95653d446873e33f1f80599a7e356 (patch)
tree1087861cd779e5a76b9ffdcc2ef2fc740881cca7 /ir/be/begnuas.h
parent11e83d4099acb0220c235dc7211ee7feeee6dc82 (diff)
begnuas: Correctly handle initializers with relocations in PIC
In PIC code we cannot use ".rodata" for initializers that contain relocations but have to use data.rel.ro(.local)
Diffstat (limited to 'ir/be/begnuas.h')
-rw-r--r--ir/be/begnuas.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ir/be/begnuas.h b/ir/be/begnuas.h
index 162ba3c..e1fb367 100644
--- a/ir/be/begnuas.h
+++ b/ir/be/begnuas.h
@@ -20,7 +20,9 @@
typedef enum {
GAS_SECTION_TEXT, /**< text section - program code */
GAS_SECTION_DATA, /**< data section - arbitrary data */
- GAS_SECTION_RODATA, /**< rodata section - read-only data */
+ GAS_SECTION_RODATA, /**< read only data no relocations */
+ GAS_SECTION_REL_RO, /**< read only data containing relocations */
+ GAS_SECTION_REL_RO_LOCAL, /**< read only data containing local relocs */
GAS_SECTION_BSS, /**< bss section - zero initialized data */
GAS_SECTION_CONSTRUCTORS, /**< ctors section */
GAS_SECTION_DESTRUCTORS, /**< dtors section */
@@ -48,6 +50,7 @@ typedef enum elf_variant_t {
extern bool be_gas_emit_types;
extern elf_variant_t be_gas_elf_variant;
+extern bool be_gas_pic;
/**
* the .type directive needs to specify @function, #function or %function