Commit d6c7b215 authored by Matthias Braun's avatar Matthias Braun
Browse files

implement several new section types including comdat for ELF, this potentially...

implement several new section types including comdat for ELF, this potentially breaks COFF and MACHO (will fix it asap)

[r27136]
parent 4467a3c2
This diff is collapsed.
......@@ -31,19 +31,21 @@
#include "be.h"
#include "beemitter.h"
typedef enum section_t {
GAS_SECTION_TEXT, /**< text section - contains program code */
GAS_SECTION_DATA, /**< data section - contains arbitrary data */
GAS_SECTION_RODATA, /**< rodata section - contains read-only data */
GAS_SECTION_BSS, /**< bss section - contains uninitialized data */
GAS_SECTION_TLS_DATA, /**< thread local storage section */
GAS_SECTION_TLS_BSS, /**< thread local storage yero initialized */
GAS_SECTION_CONSTRUCTORS, /**< ctors section */
GAS_SECTION_DESTRUCTORS, /**< dtors section */
GAS_SECTION_CSTRING, /**< section for constant strings */
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_BSS, /**< bss section - zero initialized data */
GAS_SECTION_CONSTRUCTORS, /**< ctors section */
GAS_SECTION_DESTRUCTORS, /**< dtors section */
GAS_SECTION_CSTRING, /**< section for constant strings */
GAS_SECTION_PIC_TRAMPOLINES, /**< trampolines for pic codes */
GAS_SECTION_PIC_SYMBOLS, /**< contains resolved pic symbols */
GAS_SECTION_LAST = GAS_SECTION_PIC_SYMBOLS
GAS_SECTION_LAST = GAS_SECTION_PIC_SYMBOLS,
GAS_SECTION_TYPE_MASK = 0xFF,
GAS_SECTION_FLAG_TLS = 1 << 8, /**< thread local flag */
GAS_SECTION_FLAG_COMDAT = 1 << 9 /**< thread local version of _BSS */
} be_gas_section_t;
typedef enum object_file_format_t {
......
......@@ -452,8 +452,8 @@ int tr_vrfy(void)
/* this is odd and should not be allowed I think */
ASSERT_AND_RET(!is_method_entity(entity),
"method in THREAD_LOCAL segment", 1);
ASSERT_AND_RET(!(get_entity_linkage(entity) & IR_LINKAGE_MERGE),
"IR_LINKAGE_MERGE currently not support for thread locals", 1);
ASSERT_AND_RET(! (get_entity_linkage(entity) & IR_LINKAGE_CONSTANT),
"thread locals must not be constant", 1);
}
return res;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment