History

Fix elf version info

herman ten brugge committed 7 years ago

Commit 588dd681 parent a7b37f91 file · +1 −1Browse files

Unified · Split

tccelf.c+1−1
@@ -92,7 +92,6 @@ ST_FUNC void tccelf_new(TCCState *s) · 91 unmodified lines
92 versym_section = new_section(s, ".gnu.version", SHT_GNU_versym, SHF_ALLOC);92 versym_section = new_section(s, ".gnu.version", SHT_GNU_versym, SHF_ALLOC);
93 versym_section->sh_entsize = sizeof(ElfW(Half));93 versym_section->sh_entsize = sizeof(ElfW(Half));
94 verneed_section = new_section(s, ".gnu.version_r", SHT_GNU_verneed, SHF_ALLOC);94 verneed_section = new_section(s, ".gnu.version_r", SHT_GNU_verneed, SHF_ALLOC);
95 verneed_section->sh_info = 2;
96 common_section = new_section(s, ".common", SHT_NOBITS, SHF_PRIVATE);95 common_section = new_section(s, ".common", SHT_NOBITS, SHF_PRIVATE);
97 common_section->sh_num = SHN_COMMON;96 common_section->sh_num = SHN_COMMON;
98 97
@@ -724,6 +723,7 @@ version_add (TCCState *s) · 625 unmodified lines
724 symtab = s->dynsym; /* symtab can be realocated by add_need_sym */723 symtab = s->dynsym; /* symtab can be realocated by add_need_sym */
725 }724 }
726 /* generate verneed section */725 /* generate verneed section */
726 verneed_section->sh_info = nb_need;
727 for (i = 0; i < nb_need; i++) {727 for (i = 0; i < nb_need; i++) {
728 verneed.vn_version = 1;728 verneed.vn_version = 1;
729 verneed.vn_cnt = need[i].n_aux;729 verneed.vn_cnt = need[i].n_aux;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t