fix cross compiler compilation
{l,}bounds_section is only conditionally defined.
This commit is contained in:
parent
cf10c1db66
commit
60eac659d4
1 changed files with 8 additions and 2 deletions
10
tccelf.c
10
tccelf.c
|
@ -1957,8 +1957,11 @@ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr,
|
||||||
if (k != 6)
|
if (k != 6)
|
||||||
continue;
|
continue;
|
||||||
} else if (s == data_ro_section ||
|
} else if (s == data_ro_section ||
|
||||||
|
#ifdef CONFIG_TCC_BCHECK
|
||||||
s == bounds_section ||
|
s == bounds_section ||
|
||||||
s == lbounds_section) {
|
s == lbounds_section ||
|
||||||
|
#endif
|
||||||
|
0) {
|
||||||
if (k != 4)
|
if (k != 4)
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1988,8 +1991,11 @@ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr,
|
||||||
dyninf->rel_size = (addr - dyninf->rel_addr) + s->sh_size;
|
dyninf->rel_size = (addr - dyninf->rel_addr) + s->sh_size;
|
||||||
}
|
}
|
||||||
if (s == data_ro_section ||
|
if (s == data_ro_section ||
|
||||||
|
#ifdef CONFIG_TCC_BCHECK
|
||||||
s == bounds_section ||
|
s == bounds_section ||
|
||||||
s == lbounds_section) {
|
s == lbounds_section ||
|
||||||
|
#endif
|
||||||
|
0) {
|
||||||
if (roinf->sh_size == 0) {
|
if (roinf->sh_size == 0) {
|
||||||
roinf->sh_offset = s->sh_offset;
|
roinf->sh_offset = s->sh_offset;
|
||||||
roinf->sh_addr = s->sh_addr;
|
roinf->sh_addr = s->sh_addr;
|
||||||
|
|
Loading…
Reference in a new issue