This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Porting binutils to Amiga Unix


I’m attempting to port binutils to Amiga Unix which is AT&T SVr4. I’m doing this because there are a few things I’d like to compile for which the native ld hangs as well as some pieces of software naturally recommend the gnu tools. However, I have some questions that I hope someone can help with. What I think I need help with is determining the emulation parameters: i.e. TEXT_START_ADDR, MAXPAGESIZE, NOP, etc. for ld? How do I go about determining these? More information regarding what I have and what I’m dealing with follows.

Here is what I have to work with:
AT&T Unix SVr4 on an Amiga with a 68030 processor, 16MB ram, 256MB swap.
Version 2.7.2.3 gcc compiler.
Version 2.2 libtool.

As this Unix is rather old, it does not have many c headers that are common today like stdint. I’m guessing this means it is either best / easiest to work with an earlier / early release of binutils.

If I try binutils version 2.8.1, it’s config.guess will recognize the canonical name of the machine m68k-cbm-sysv4. Later versions do not, simply returning m68k-unknown-sysv4, while the config.guess does recognize that it is an amiga and not amiga bsd. I presume dropping the canonical name was due to lack of interest or activity in development, and being designated m68k-unknown-sysv4 doesn’t affect much. In either case, while configuring ld, configure fails because "*** ld does not support target m68k-unknown-sysv4.”

So it looks like I need to setup something in configure.tgt to set targ_emul variable and then go from there.

My understanding has been that Amiga Unix uses the elf format for binaries. Looking at some binaries on the system, they begin with the magic number 7F. Wondering if the information I require could be gleaned by readelf, I downloaded the earliest copy of binutils that has that. I was able to compile readelf and its dependencies. Looking at some binaries, the “Entry Point Address” is something greater than 0x80000000 (I’ve seen addresses of 0x800000f94, 0x80000117c, 0x8000027d0). This is a guess, but using m68kelf.sh in emulparameters as a starting point: TEXT_START_ADDR=0x80000000? For both paged and non-paged?

If I run pagesize from the command prompt, I get a page size of 2048. So should I set my “MAXPAGESIZE” to 0x800? 

What should NOP be? In some emulation parameters, it’s not set at all.

Are there any other parameters that I should be setting?

Hope someone will be so kind as to provide some guidance. The porting guide that I looked at doesn’t seem to discuss the emulation parameters themselves.

I have continued trying to compile the rest of binutils. I have addr2line, ar, nm, objcopy, objdum, ranlib, readelf, size, strings, and strip compiled. Gas compiles but hangs during linking with AT&T ld. 

Regards,

Mack B Wallace


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]