History

fix cross compiler compilation

{l,}bounds_section is only conditionally defined.

Michael Matz committed 5 years ago

Commit 60eac651 parent cf10c1d1 file · +8 −2Browse files

Unified · Split

tccelf.c+8−2
@@ -1957,8 +1957,11 @@ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr, · 1956 unmodified lines
19571957 if (k != 6)
19581958 continue;
19591959 } else if (s == data_ro_section ||
1960+#ifdef CONFIG_TCC_BCHECK
19601961 s == bounds_section ||
1961− s == lbounds_section) {
1962+ s == lbounds_section ||
1963+#endif
1964+ 0) {
19621965 if (k != 4)
19631966 continue;
19641967 } else {
@@ -1988,8 +1991,11 @@ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr, · 23 unmodified lines
19881991 dyninf->rel_size = (addr - dyninf->rel_addr) + s->sh_size;
19891992 }
19901993 if (s == data_ro_section ||
1994+#ifdef CONFIG_TCC_BCHECK
19911995 s == bounds_section ||
1992− s == lbounds_section) {
1996+ s == lbounds_section ||
1997+#endif
1998+ 0) {
19931999 if (roinf->sh_size == 0) {
19942000 roinf->sh_offset = s->sh_offset;
19952001 roinf->sh_addr = s->sh_addr;

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