mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 12:34:45 +00:00
don't discard SHT_((PRE)INIT|FINI)_ARRAY sections
This commit is contained in:
7
elf.h
7
elf.h
@@ -318,7 +318,12 @@ typedef struct
|
|||||||
#define SHT_REL 9 /* Relocation entries, no addends */
|
#define SHT_REL 9 /* Relocation entries, no addends */
|
||||||
#define SHT_SHLIB 10 /* Reserved */
|
#define SHT_SHLIB 10 /* Reserved */
|
||||||
#define SHT_DYNSYM 11 /* Dynamic linker symbol table */
|
#define SHT_DYNSYM 11 /* Dynamic linker symbol table */
|
||||||
#define SHT_NUM 12 /* Number of defined types. */
|
#define SHT_INIT_ARRAY 14 /* Array of constructors */
|
||||||
|
#define SHT_FINI_ARRAY 15 /* Array of destructors */
|
||||||
|
#define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */
|
||||||
|
#define SHT_GROUP 17 /* Section group */
|
||||||
|
#define SHT_SYMTAB_SHNDX 18 /* Extended section indices */
|
||||||
|
#define SHT_NUM 19 /* Number of defined types. */
|
||||||
#define SHT_LOOS 0x60000000 /* Start OS-specific */
|
#define SHT_LOOS 0x60000000 /* Start OS-specific */
|
||||||
#define SHT_LOSUNW 0x6ffffffb /* Sun-specific low bound. */
|
#define SHT_LOSUNW 0x6ffffffb /* Sun-specific low bound. */
|
||||||
#define SHT_SUNW_COMDAT 0x6ffffffb
|
#define SHT_SUNW_COMDAT 0x6ffffffb
|
||||||
|
|||||||
3
tccelf.c
3
tccelf.c
@@ -2321,6 +2321,9 @@ ST_FUNC int tcc_load_object_file(TCCState *s1,
|
|||||||
sh->sh_type != SHT_ARM_EXIDX &&
|
sh->sh_type != SHT_ARM_EXIDX &&
|
||||||
#endif
|
#endif
|
||||||
sh->sh_type != SHT_NOBITS &&
|
sh->sh_type != SHT_NOBITS &&
|
||||||
|
sh->sh_type != SHT_PREINIT_ARRAY &&
|
||||||
|
sh->sh_type != SHT_INIT_ARRAY &&
|
||||||
|
sh->sh_type != SHT_FINI_ARRAY &&
|
||||||
strcmp(sh_name, ".stabstr")
|
strcmp(sh_name, ".stabstr")
|
||||||
)
|
)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user