Page MenuHomeFreeBSD

libkldelf: add elf_lookup_symbol function
ClosedPublic

Authored by khng on Sep 23 2024, 6:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 23, 1:18 AM
Unknown Object (File)
Wed, Oct 15, 12:42 AM
Unknown Object (File)
Wed, Oct 15, 12:42 AM
Unknown Object (File)
Wed, Oct 15, 12:42 AM
Unknown Object (File)
Tue, Oct 14, 4:00 PM
Unknown Object (File)
Mon, Oct 13, 8:29 PM
Unknown Object (File)
Tue, Sep 30, 3:57 AM
Unknown Object (File)
Fri, Sep 26, 11:40 PM
Subscribers
None

Details

Summary

The elf_lookup_symbol function looks up the symbol with a given symbol
name. A pointer to the GElf_Sym of the symbol is returned if the symbol
exists in the opened ELF file.

Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59573
Build 56460: arc lint + arc unit

Event Timeline

khng requested review of this revision.Sep 23 2024, 6:42 PM
khng created this revision.
lib/libkldelf/kldelf.h
321

What if there is more than one symbol with the same name? This can happen e.g., with local function symbols.

lib/libkldelf/kldelf.h
321

For now it will just return the first one being found when traversing symtab.

markj added inline comments.
lib/libkldelf/kldelf.h
321

I'd mention that caveat in the comment.

This revision is now accepted and ready to land.Sep 30 2024, 8:49 AM
This revision was automatically updated to reflect the committed changes.