diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-07-18 08:44:38 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-07-18 08:44:38 +0000 |
| commit | b9f3ea3e1c7d5e1ddc0f187b3772527f98af3143 (patch) | |
| tree | 528c80ef6bda52723d3fc9a0e5b391b08cc801bb /llvm/test/Transforms/LoopDataPrefetch | |
| parent | 9958f620f93d263fcc932b58cdfe9029997d211e (diff) | |
| download | bcm5719-llvm-b9f3ea3e1c7d5e1ddc0f187b3772527f98af3143.tar.gz bcm5719-llvm-b9f3ea3e1c7d5e1ddc0f187b3772527f98af3143.zip | |
[ELF] - Do not produce broken output when amount of sections is > ~65k
This is a part of ttps://bugs.llvm.org//show_bug.cgi?id=38119
We produce broken ELF header now when the number of output sections is >= SHN_LORESERVE (0xff00).
ELF spec says (http://www.sco.com/developers/gabi/2003-12-17/ch4.eheader.html):
e_shnum:
If the number of sections is greater than or equal to SHN_LORESERVE (0xff00), this member has the value zero
and the actual number of section header table entries is contained in the sh_size field of the section header at index 0.
(Otherwise, the sh_size member of the initial entry contains 0.)
e_shstrndx
If the section name string table section index is greater than or equal to SHN_LORESERVE (0xff00), this member has the
value SHN_XINDEX (0xffff) and the actual index of the section name string table section is contained in the sh_link field of
the section header at index 0. (Otherwise, the sh_link member of the initial entry contains 0.)
We did not set these fields correctly earlier. The patch fixes the issue.
Differential revision: https://reviews.llvm.org/D49371
llvm-svn: 337363
Diffstat (limited to 'llvm/test/Transforms/LoopDataPrefetch')
0 files changed, 0 insertions, 0 deletions

