Skip to content
Snippets Groups Projects
Commit b6a6bdab authored by Shankar Easwaran's avatar Shankar Easwaran
Browse files

[ELF][Hexagon] typeZeroFillQuick is not associated with bss section.

We need to increase the memory and the filesize when we add a typeZeroFillQuick
atom.

llvm-svn: 200369
parent 50f32d94
No related branches found
No related tags found
No related merge requests found
...@@ -288,6 +288,7 @@ const lld::AtomLayout &AtomSection<ELFT>::appendAtom(const Atom *atom) { ...@@ -288,6 +288,7 @@ const lld::AtomLayout &AtomSection<ELFT>::appendAtom(const Atom *atom) {
case DefinedAtom::typeConstant: case DefinedAtom::typeConstant:
case DefinedAtom::typeData: case DefinedAtom::typeData:
case DefinedAtom::typeDataFast: case DefinedAtom::typeDataFast:
case DefinedAtom::typeZeroFillFast:
case DefinedAtom::typeGOT: case DefinedAtom::typeGOT:
case DefinedAtom::typeStub: case DefinedAtom::typeStub:
case DefinedAtom::typeResolver: case DefinedAtom::typeResolver:
...@@ -312,7 +313,6 @@ const lld::AtomLayout &AtomSection<ELFT>::appendAtom(const Atom *atom) { ...@@ -312,7 +313,6 @@ const lld::AtomLayout &AtomSection<ELFT>::appendAtom(const Atom *atom) {
break; break;
case DefinedAtom::typeThreadZeroFill: case DefinedAtom::typeThreadZeroFill:
case DefinedAtom::typeZeroFill: case DefinedAtom::typeZeroFill:
case DefinedAtom::typeZeroFillFast:
_atoms.push_back(new (_alloc) lld::AtomLayout(atom, mOffset, 0)); _atoms.push_back(new (_alloc) lld::AtomLayout(atom, mOffset, 0));
this->_msize = mOffset + definedAtom->size(); this->_msize = mOffset + definedAtom->size();
break; break;
......
static int a = 0;
int b = 10;
File added
int sdata1 = 10;
int sdata2 = 20;
int sdata3 = 30;
int sbss1 = 0;
File added
# This tests that a typeZeroFillFast atom is associated with a section that has
# the correct memory size.
RUN: lld -flavor gnu -target hexagon %p/Inputs/sdata1.o %p/Inputs/sdata2.o \
RUN: -o %t --noinhibit-exec -static
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=CHECKSECTIONSANDSIZE %s
CHECKSECTIONSANDSIZE: Section {
CHECKSECTIONSANDSIZE: Name: .sdata (13)
CHECKSECTIONSANDSIZE: Address: 0x1000
CHECKSECTIONSANDSIZE: Offset: 0x1000
CHECKSECTIONSANDSIZE: Size: 20
CHECKSECTIONSANDSIZE: }
CHECKSECTIONSANDSIZE: Section {
CHECKSECTIONSANDSIZE: Name: .bss (20)
CHECKSECTIONSANDSIZE: Address: 0x1018
CHECKSECTIONSANDSIZE: Offset: 0x1018
CHECKSECTIONSANDSIZE: }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment