{l,}bounds_section is only conditionally defined.
Unified · Split
| @@ -1957,8 +1957,11 @@ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr, · 1956 unmodified lines | |||
| 1957 | if (k != 6) | 1957 | if (k != 6) |
| 1958 | continue; | 1958 | continue; |
| 1959 | } else if (s == data_ro_section || | 1959 | } else if (s == data_ro_section || |
| 1960 | #ifdef CONFIG_TCC_BCHECK | ||
| 1960 | s == bounds_section || | 1961 | s == bounds_section || |
| 1961 | s == lbounds_section) { | 1962 | s == lbounds_section || |
| 1963 | #endif | ||
| 1964 | 0) { | ||
| 1962 | if (k != 4) | 1965 | if (k != 4) |
| 1963 | continue; | 1966 | continue; |
| 1964 | } else { | 1967 | } else { |
| @@ -1988,8 +1991,11 @@ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr, · 23 unmodified lines | |||
| 1988 | dyninf->rel_size = (addr - dyninf->rel_addr) + s->sh_size; | 1991 | dyninf->rel_size = (addr - dyninf->rel_addr) + s->sh_size; |
| 1989 | } | 1992 | } |
| 1990 | if (s == data_ro_section || | 1993 | if (s == data_ro_section || |
| 1994 | #ifdef CONFIG_TCC_BCHECK | ||
| 1991 | s == bounds_section || | 1995 | s == bounds_section || |
| 1992 | s == lbounds_section) { | 1996 | s == lbounds_section || |
| 1997 | #endif | ||
| 1998 | 0) { | ||
| 1993 | if (roinf->sh_size == 0) { | 1999 | if (roinf->sh_size == 0) { |
| 1994 | roinf->sh_offset = s->sh_offset; | 2000 | roinf->sh_offset = s->sh_offset; |
| 1995 | roinf->sh_addr = s->sh_addr; | 2001 | roinf->sh_addr = s->sh_addr; |