[ELF] Make dot in .tbss correct
GNU ld doesn't support multiple SHF_TLS SHT_NOBITS output sections (it restores the address after an SHF_TLS SHT_NOBITS section, so consecutive SHF_TLS SHT_NOBITS sections will have conflicting address ranges). That said, `threadBssOffset` implements limited support for consecutive SHF_TLS SHT_NOBITS sections. (SHF_TLS SHT_PROGBITS following a SHF_TLS SHT_NOBITS can still be incorrect.) `.` in an output section description of an SHF_TLS SHT_NOBITS section is incorrect. (https://lists.llvm.org/pipermail/llvm-dev/2021-July/151974.html) This patch saves the end address of the previous tbss section in `ctx->tbssAddr`, changes `dot` in the beginning of `assignOffset` so that `.` evaluation will be correct. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D107208 (cherry picked from commit 9bd29a73)
Loading
Please register or sign in to comment