Page MenuHomeFreeBSD

Correct module symbol export handling
ClosedPublic

Authored by emaste on Feb 9 2018, 6:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 3:34 PM
Unknown Object (File)
Thu, Nov 14, 8:16 AM
Unknown Object (File)
Mon, Oct 28, 10:25 AM
Unknown Object (File)
Oct 23 2024, 2:23 PM
Unknown Object (File)
Oct 18 2024, 9:04 PM
Unknown Object (File)
Oct 8 2024, 2:24 AM
Unknown Object (File)
Oct 4 2024, 9:15 AM
Unknown Object (File)
Oct 2 2024, 6:17 AM
Subscribers

Details

Summary

EXPORT_SYMS can be set to YES, NO, a list of symbols to export from a module, or to a filename containing such a list. For the case that it is set to a symbol list, replace spaces in the list with newlines, so the created file is in the format expected by kmod_syms.awk.

Sponsored by: Turing Robotic Industries Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 9 2018, 7:00 PM
emaste added a subscriber: stevek.

Microoptimize away a fork+exec of tr, from @stevek

This revision now requires review to proceed.Feb 9 2018, 7:08 PM

Looks ok to me. Did you have a test kernel module you used to test this?

In D14284#300389, @jhb wrote:

Looks ok to me. Did you have a test kernel module you used to test this?

I discovered this while trying to test an in-progress arm64 linuxolator port, observed by comparing symbols listed in readelf -s / nm -D with what I expected. I'll see about adding an explicit test module to demonstrate the issue, although the fact that amd64 uses .o kernel modules is a confounding issue.

I was just curious, I don't think there's probably a need to make a test module (though having a real test for this might be nice). I had figured you had run into it somehow and was wondering if that somehow had turned into an easy test to verify correctness. :)

This revision is now accepted and ready to land.Feb 12 2018, 9:55 PM
In D14284#300508, @jhb wrote:

I was just curious, I don't think there's probably a need to make a test module (though having a real test for this might be nice). I had figured you had run into it somehow and was wondering if that somehow had turned into an easy test to verify correctness. :)

It's proved difficult to verify end-to-end behaviour, because symbol handling in our kernel loader is somewhat wonky; depending on architecture symbols may come from .dynsym or .symtab.

This revision was automatically updated to reflect the committed changes.