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

Function phdr_write

util/cbfstool/elfheaders.c:908–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908static void
909phdr_write(struct elf_writer *ew, struct buffer *m, Elf64_Phdr *phdr)
910{
911 if (ew->bit64) {
912 ew->xdr->put32(m, phdr->p_type);
913 ew->xdr->put32(m, phdr->p_flags);
914 ew->xdr->put64(m, phdr->p_offset);
915 ew->xdr->put64(m, phdr->p_vaddr);
916 ew->xdr->put64(m, phdr->p_paddr);
917 ew->xdr->put64(m, phdr->p_filesz);
918 ew->xdr->put64(m, phdr->p_memsz);
919 ew->xdr->put64(m, phdr->p_align);
920 } else {
921 ew->xdr->put32(m, phdr->p_type);
922 ew->xdr->put32(m, phdr->p_offset);
923 ew->xdr->put32(m, phdr->p_vaddr);
924 ew->xdr->put32(m, phdr->p_paddr);
925 ew->xdr->put32(m, phdr->p_filesz);
926 ew->xdr->put32(m, phdr->p_memsz);
927 ew->xdr->put32(m, phdr->p_flags);
928 ew->xdr->put32(m, phdr->p_align);
929 }
930
931}
932
933static int section_consecutive(struct elf_writer *ew, Elf64_Half secidx)
934{

Callers 1

write_phdrsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected