Skip to contentSkip to conversation

modules/ksyms/filenames

DISCUSSION Peter J. Braam 3 participants 3 messages Jul 19, 2001 – Jul 20, 2001

lore
Share & tools
lore
#0 lore raw

I'm trying to export a symbol (journal_begin/end) from fs/reiserfs/journal.c. To export the symbols I added to the Makefile:
export-objs := journal.o

There is also a file fs/jbd/journal.c which exports symbols.

It seems that the two journal.ver files in include/modules/*.ver get clobbered.

Short of renaming files, is there a good solution for this?

Thanks!

#1 lore raw
Quoted 5 lines · Peter J. Braam

I'm trying to export a symbol (journal_begin/end) from fs/reiserfs/journal.c. To export the symbols I added to the Makefile:
export-objs := journal.o

There is also a file fs/jbd/journal.c which exports symbols.

It is a "feature" of the module symbol versioning that all objects which export symbols must have globally unique basenames. Stupid, I know, and it will disappear in 2.5. In the meantime, create fs/reiserfs/reiserfs_ksyms.c and export the symbols in there. See kernel/ksyms.c for an example.

#2 lore raw
In reply to Peter J. Braam

Hi,

Quoted 10 lines · Peter J. Braam

I'm trying to export a symbol (journal_begin/end) from fs/reiserfs/journal.c. To export the symbols I added to the Makefile:
export-objs := journal.o

There is also a file fs/jbd/journal.c which exports symbols.

It seems that the two journal.ver files in include/modules/*.ver get clobbered.

Short of renaming files, is there a good solution for this?

Yes, you can add the EXPORT_SYMBOL to a different source file --- you don't have to do the export from the same file which defines the symbol. linux/kernel/ksyms.c contains exports from all over the rest of the kernel, for example. If you pick a reiserfs source file which already exports symbols and add your exports there, I _think_ it should work OK.

Cheers,
Stephen