forked from OSchip/llvm-project
COFF: Fix resource table size.
The size field shouldn't include trailing padding. llvm-svn: 239712
This commit is contained in:
parent
cb070e3833
commit
59e9578f20
|
@ -290,7 +290,7 @@ void Writer::writeHeader() {
|
|||
}
|
||||
if (OutputSection *Sec = findSection(".rsrc")) {
|
||||
DataDirectory[RESOURCE_TABLE].RelativeVirtualAddress = Sec->getRVA();
|
||||
DataDirectory[RESOURCE_TABLE].Size = Sec->getRawSize();
|
||||
DataDirectory[RESOURCE_TABLE].Size = Sec->getVirtualSize();
|
||||
}
|
||||
if (OutputSection *Sec = findSection(".reloc")) {
|
||||
DataDirectory[BASE_RELOCATION_TABLE].RelativeVirtualAddress = Sec->getRVA();
|
||||
|
|
|
@ -11,4 +11,4 @@ EXE: {{H.e.l.l.o}}
|
|||
# RUN: llvm-readobj -file-headers %t.exe | FileCheck --check-prefix=HEADER %s
|
||||
|
||||
HEADER: ResourceTableRVA: 0x1000
|
||||
HEADER: ResourceTableSize: 0x200
|
||||
HEADER: ResourceTableSize: 0x88
|
||||
|
|
Loading…
Reference in New Issue