Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/elftoolchain/libelf/libelf_extended.c
Show All 33 Lines | |||||
/* | /* | ||||
* Retrieve section #0, allocating a new section if needed. | * Retrieve section #0, allocating a new section if needed. | ||||
*/ | */ | ||||
static Elf_Scn * | static Elf_Scn * | ||||
_libelf_getscn0(Elf *e) | _libelf_getscn0(Elf *e) | ||||
{ | { | ||||
Elf_Scn *s; | Elf_Scn *s; | ||||
if ((s = STAILQ_FIRST(&e->e_u.e_elf.e_scn)) != NULL) | if ((s = RB_MIN(scntree, &e->e_u.e_elf.e_scn)) != NULL) | ||||
return (s); | return (s); | ||||
return (_libelf_allocate_scn(e, (size_t) SHN_UNDEF)); | return (_libelf_allocate_scn(e, (size_t) SHN_UNDEF)); | ||||
} | } | ||||
int | int | ||||
_libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) | _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |