Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/Writer.cpp | ||
---|---|---|
671 ↗ | (On Diff #38701) | ThreadBSSOffset -> TbssOffset since .tbss is a section name. |
706–707 ↗ | (On Diff #38701) | ThreadBSSOffset = TVA - VA + Sec->getSize(); |
725 ↗ | (On Diff #38701) | Can you make TlsPhdr a Elf_Phdr (instead of Elf_Phdr *) and check if its validity using its members? If TlsPhdr.p_vaddr > 0, for example, it must have a valid value. |
Comment Actions
Address review comments.
ELF/Writer.cpp | ||
---|---|---|
671 ↗ | (On Diff #38701) | .tbss is not the only possible section name. And this variable exists because of that. It handles the case of multiple SHF_ALLOC | SHF_WRITE | SHF_TLS, SHT_NOBITS output sections. |
ELF/Writer.cpp | ||
---|---|---|
674 ↗ | (On Diff #38994) | Do we need this? Isn't an Elf_Phdr zero-initialized? |
ELF/Writer.cpp | ||
---|---|---|
674 ↗ | (On Diff #38994) | There's no explicit zero init, and I'm pretty sure default-initialization here does nothing. |
ELF/Writer.cpp | ||
---|---|---|
674 ↗ | (On Diff #38994) | What about next ? Elf_Phdr TlsPhdr = {}; |
ELF/Writer.cpp | ||
---|---|---|
674 ↗ | (On Diff #38994) | Seems like a good idea. I was not completely sure if the empty initializer is allowed to initialize a struct, but it seems to be accepted. |