Re: 64 bit powerpc
"Peter J. Philipp" <[email protected]> Sun, 14 Oct 2018 19:39:09 +0200
| Newsgroups | gmane.os.openbsd.ppc |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Oct 14, 2018 at 06:38:53PM +0200, Mark Kettenis wrote: > > Date: Sun, 14 Oct 2018 17:43:47 +0200 > > From: "Peter J. Philipp" <[email protected]> > > > > On Tue, Sep 18, 2018 at 10:04:01AM +0200, Peter J. Philipp wrote: > > > Hi OpenBSD PPC Community, > > > > Hi again! I've managed to get a bit further. I'm a step away from linking > > the kernel for the first time, but I have error messages and it seems to come > > from the linker. I'm a bit dumb about this right now so I thought I'd ask if > > you guys can make out what the error wants me to do. > > > > http://enhancedrisc.de/#20181014 > > The instructions you use in locore0.S to refer to fwargsave, esym and > proc0paddr only have limited range and when the final link is done > these symbols are put at an offset that is to large. You probably > have to rewrite the bits of code in locore0.S that deal with the > global variables to use instruction sequences that can reach larger > offsets. Awesome explanation thanks! And I noticed I strayed too far from the example given to me by the 32 bit macppc code. I corrected that and I got this: ... ld -N -Ttext 100114 -e start --warn-common -nopie -o bsd ${SYSTEM_HEAD} vers.o ${OBJS} text data bss dec hex 6367624 2074912 671936 9114472 8b1368 mv bsd bsd.gdb ctfstrip -S -o bsd bsd.gdb ct4# So the very first cross-compiled kernel. I doubt it works but its so tempting to put it on. I need a 64 bit loader anyhow so I'll work on that for a bit, I hope I can reuse the macppc loader. Finally I'm able to test code with the compiler! This is often a great help to me. I've committed everything that wasn't committed in my aim64 and powerpc64 tree and with this change which I'll commit in a sec there should be at least the compilable sources (buggy or not). Best Regards, -peter