Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I don't think this produces an object file. Most likely a raw binary, which you can't link with anything in a normal way.
It is a raw binary. I tried nasm -felf boot.asm but it doesn't work. So, I'm thinking I have to get them to link or try to get gcc to compile to raw binary either.
Are you building a mulitboot executable to be used with GRUB or are you building a bootloader that runs in real mode that loads your kernel? I ask because your linker script outputs binary but the contents suggest you might be doing multiboot. Your line nasm boot.asm would build a BIN file. Maybe you meant nasm -f elf32 boot.asm -o boot.o. If doing multiboot you don't want to output as binary in your linker script either. If we saw your boot.asm we might be able to tell what your end goal is.
I'm not doing anything with multiboot.
I want to have the kernel on second sector of a disk loaded by the bootloader and then jump or pass to running C code.
I've done this before a while ago but I can't remember how exactly. I'm pretty sure I used the sample linker scripts, but it seems to me now that it would be simpler to just have raw C compiled pasted instead.
The linker script you are using appears to be for multiboot usage. Maybe what you did previous was build your boot.asm into a bootsector (binary file) and built your kernel separately into a separate binary and then placed them into a disk image with something like DD?
Linking them together isn't straight forward, so not likely what you had done previously. As an example of how you could do it the more complex way, I slapped together an example as a proof of concept. The kernel disk reading routine is a hack for demonstration purposes; it uses the fast method of turning on A20 for demo purposes. It has a boot.asm that enters into protected mode, zeroes the BSS section, then transfers to a kernel entry point called kmain. It should display MDP in the upper left with white on magenta.