Fix xfs build error on ia64 (mismatch section for xfs_qm_exit())
PATCH 1/1 Fix xfs build error on ia64 (mismatch section for xfs_qm_exit())
ia64 deletes __exit section during the final link stage of vmlinux. This means that code should not call __exit functions in modules that can be built in to the kernel.
Building with CONFIG_DEBUG_SECTION_MISMATCH=y we see these build messages:
WARNING: vmlinux.o(.init.text+0x22462): Section mismatch in reference from the function init_xfs_fs() to the function .exit.text:xfs_qm_exit() The function __init init_xfs_fs() references
a function __exit xfs_qm_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation ofxfs_qm_exit() so it may be used outside an exit section.
...
xfs_qm_exit' referenced in section .init.text' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
make: *** [.tmp_vmlinux1] Error 1
Introduced in commit a05931ceb0160deadbd7798d60d01b17f2d81b09
xfs: remove the global xfs_Gqm structure
---
fs/xfs/xfs_dquot.c +1 -1
@@ -1065,7 +1065,7 @@ out:return -ENOMEM ; } -void __exit +void xfs_qm_exit (void ) {kmem_zone_destroy (xfs_qm_dqtrxzone);
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 16 lines · Tony
ia64 deletes
__exitsection during the final link stage of vmlinux. This means that code should not call__exitfunctions in modules that can be built in to the kernel.Building with
CONFIG_DEBUG_SECTION_MISMATCH=ywe see these build messages:WARNING:
vmlinux.o(.init.text+0x22462): Section mismatch in reference from the functioninit_xfs_fs()to the function .exit.text:xfs_qm_exit() The function__initinit_xfs_fs()references
a function__exitxfs_qm_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the__exitannotation ofxfs_qm_exit()so it may be used outside an exit section....
Quoted 7 lines
xfs_qm_exit' referenced in section.init.text' offs/built-in.o: defined in discarded section `.exit.text' offs/built-in.o
make: *** [.tmp_vmlinux1] Error 1Introduced in commit
a05931ceb0160deadbd7798d60d01b17f2d81b09
xfs: remove the globalxfs_GqmstructureSigned-off-by Tony Luck <[email protected]>
Thanks Tony,
We have a patch from Gerard Snitselaar that fixes this.
Regards,
Ben
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs