Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] How to detect if a symbol is COMMON ?

Hi Xavier,

You can find matching ELF symbol like this:

    map_to_sym_table(sym->obj, &elf_sym);

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Xavier Pouyollon
Sent: Wednesday, June 25, 2014 9:44 AM
To: TCF Development
Subject: [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.

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tcf-dev


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



Back to the top