[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tcf-dev] How to detect if a symbol is COMMON ?
|
Hi Eugene,
In symbols_elf.c:has_symbol_address, I need to determine, in case of
vxWorks common support for kernel modules, if a symbol is common or not.
sym->obj != NULL so we have the debug infos.
In that case, sym->tbl is then NULL so it's not easy to know the symbol
type.
Can I assume the following:
if (sym->obj != NULL) {
if (sym->obj->mFlags & DOIF_location) {
/* AT_location defined, so we have an address */
/* VxWorks common : The DKM do have AT_location but we
don't have the relocation */
/* Either the extension point ELF_SYMS_GET_ADDR returns
the defined common */
/* OR we need to go down in the search to find a non-common
symbol. */
if (sym->obj->mFlags & DOIF_external)
return 0;
else
return 1;
}
Any better proposal ?
PS : In that case, the DKM has:
WIND_TCB * taskIdCurrent;
and taskIdCurrent being defined in the vxWorks kernel.
Our extension point only returns addresses for defined common for a
given module.
In that case, the common is resolved (into the kernel)
so the extension point doesn't return an address so I need to continue
the search.
Thanks !
Very Best Regards,
Xavier.