MCPcopy Create free account
hub / github.com/coreboot/coreboot / section_consecutive

Function section_consecutive

util/cbfstool/elfheaders.c:933–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933static int section_consecutive(struct elf_writer *ew, Elf64_Half secidx)
934{
935 Elf64_Half i;
936 struct elf_writer_section *prev_alloc = NULL;
937
938 if (secidx == 0)
939 return 0;
940
941 for (i = 0; i < secidx; i++) {
942 if (ew->sections[i].shdr.sh_flags & SHF_ALLOC)
943 prev_alloc = &ew->sections[i];
944 }
945
946 if (prev_alloc == NULL)
947 return 0;
948
949 if (prev_alloc->shdr.sh_addr + prev_alloc->shdr.sh_size ==
950 ew->sections[secidx].shdr.sh_addr)
951 return 1;
952
953 return 0;
954}
955
956static void write_phdrs(struct elf_writer *ew, struct buffer *phdrs)
957{

Callers 2

write_phdrsFunction · 0.85
elf_writer_serializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected