tools/cxd56: Update to output bss-only section to spk file
In creating spk image, the section which filesz is 0 is ignored, so change to check memsz instead of filesz.
This commit is contained in:
parent
1b3b12ed00
commit
3ff9432975
1 changed files with 2 additions and 2 deletions
|
|
@ -243,7 +243,7 @@ static void *create_image(struct elf_file *elf, int core, char *savename,
|
|||
psize = 0;
|
||||
for (i = 0, ph = elf->phdr; i < elf->ehdr->e_phnum; i++, ph++)
|
||||
{
|
||||
if (ph->p_type != PT_LOAD || ph->p_filesz == 0)
|
||||
if (ph->p_type != PT_LOAD || ph->p_memsz == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ static void *create_image(struct elf_file *elf, int core, char *savename,
|
|||
offset = ((char *)pi - img) + (nphs * sizeof(*pi));
|
||||
for (i = 0; i < elf->ehdr->e_phnum; i++, ph++)
|
||||
{
|
||||
if (ph->p_type != PT_LOAD || ph->p_filesz == 0)
|
||||
if (ph->p_type != PT_LOAD || ph->p_memsz == 0)
|
||||
continue;
|
||||
pi->load_address = ph->p_paddr;
|
||||
pi->offset = offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue