How to build kernel module without full kernel source tree?
Not it's not necessary. You need a header files that contains function and types declarations. You also kernel tree with Makefiles and Kconfig but without sources. This kernel tree is needed by kbuild - kernel building system.
Absolutely not. You can build a single module without building whole kernel regardless of it's out-of-tree or in-tree module.
Need to build the whole kernel after changing the .config file?
All configuration options will be converted into macros and will be written to the file include/generated/autoconf.h once you did make command to build the kernel.
After this when you change any of the configuration option you again need to run the make command which generates required files to include this new configuration options. But if you just use the command "make M=/net/sctp modules" after you change your configuration it will not affect in the make. Instead of building whole kernel what you can do is, just run the "make modules" command which generates the required files and builds your module with the options that you selected. This is the best way which also resolves if there are any dependencies on your newly configured option.
But in your case, if you know that objcnt.c doesn't depend on any other things you can change the make file of the sctp to include your file.
vim net/sctp/Makefile
sctp-y += objcnt.o
Then you can run the "make M=net/sctp modules"
Related Topics
How to Monitor the Amount of Simd Instruction Usage
How to Get the CPU Time for a Perl System Call
Docker in Wsl2 Alpine Without Docker Desktop
Nginx Location Deny by File Extension Syntax
How to Make My Makefiles Better
How to Delete the Matching Pattern from Given Occurrence
How to Cross-Compile a Qt Application for Imx6
Bash Shell: Cannot Use Variable $ as a Path to Run Tar
Gfortran Linking C Libraries with Conda
Write to Port 0Cf8H Fails with Segfault
Native Linux App to Edit Win32 Pe Like Reshacker
Will Data Written via Write() Be Flushed to Disk If a Process Is Killed
Allocating a Data Page in Linux with Nx Bit Turned Off
How to Start/Restart/Stop Apache Server on Linux as Non-Root User
Export_Symbol in Kernel Module | Undefined Symbol During Insmod