Print this page
ld should reject kernel modules as input
*** 1089,1099 ****
* If the specified object has a dynamic section, and that section
* contains a DT_FLAGS_1 entry, then return the value of that entry.
* Otherwise, return 0.
*/
GElf_Xword
! _gelf_getdyndtflags_1(Elf *elf)
{
Elf_Scn *scn = NULL;
Elf_Data *data;
GElf_Shdr shdr;
GElf_Dyn dyn;
--- 1089,1099 ----
* If the specified object has a dynamic section, and that section
* contains a DT_FLAGS_1 entry, then return the value of that entry.
* Otherwise, return 0.
*/
GElf_Xword
! _gelf_getdynval(Elf *elf, GElf_Sxword tag)
{
Elf_Scn *scn = NULL;
Elf_Data *data;
GElf_Shdr shdr;
GElf_Dyn dyn;
*** 1106,1119 ****
continue;
if (data = elf_getdata(scn, NULL)) {
n = shdr.sh_size / shdr.sh_entsize;
for (i = 0; i < n; i++) {
(void) gelf_getdyn(data, i, &dyn);
! if (dyn.d_tag == DT_FLAGS_1) {
return (dyn.d_un.d_val);
}
}
}
break;
}
return (0);
}
--- 1106,1125 ----
continue;
if (data = elf_getdata(scn, NULL)) {
n = shdr.sh_size / shdr.sh_entsize;
for (i = 0; i < n; i++) {
(void) gelf_getdyn(data, i, &dyn);
! if (dyn.d_tag == tag) {
return (dyn.d_un.d_val);
}
}
}
break;
}
return (0);
}
+
+ GElf_Xword
+ _gelf_getdyndtflags_1(Elf *elf)
+ {
+ return (_gelf_getdynval(elf, DT_FLAGS_1));
+ }