Unified · Split
| @@ -2474,7 +2474,7 @@ static Section *create_bsd_note_section(TCCState *s1, · 2473 unmodified lines | |||
| 2474 | Section *s = find_section (s1, name); | 2474 | Section *s = find_section (s1, name); |
| 2475 | 2475 | ||
| 2476 | if (s->data_offset == 0) { | 2476 | if (s->data_offset == 0) { |
| 2477 | unsigned char *ptr = section_ptr_add(s, sizeof(ElfW(Nhdr)) + 8 + 4); | 2477 | char *ptr = section_ptr_add(s, sizeof(ElfW(Nhdr)) + 8 + 4); |
| 2478 | ElfW(Nhdr) *note = (ElfW(Nhdr) *) ptr; | 2478 | ElfW(Nhdr) *note = (ElfW(Nhdr) *) ptr; |
| 2479 | 2479 | ||
| 2480 | s->sh_type = SHT_NOTE; | 2480 | s->sh_type = SHT_NOTE; |
| @@ -2493,7 +2493,10 @@ static int elf_output_file(TCCState *s1, const char *filename) · 12 unmodified lines | |||
| 2493 | { | 2493 | { |
| 2494 | int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order; | 2494 | int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order; |
| 2495 | struct dyn_inf dyninf = {0}; | 2495 | struct dyn_inf dyninf = {0}; |
| 2496 | struct ro_inf roinf, *roinf_use = NULL; | 2496 | struct ro_inf roinf; |
| 2497 | #if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32) | ||
| 2498 | struct ro_inf *roinf_use = NULL; | ||
| 2499 | #endif | ||
| 2497 | ElfW(Phdr) *phdr; | 2500 | ElfW(Phdr) *phdr; |
| 2498 | Section *strsec, *interp, *dynamic, *dynstr, *note = NULL; | 2501 | Section *strsec, *interp, *dynamic, *dynstr, *note = NULL; |
| 2499 | 2502 | ||