This is the mail archive of the 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]

Re: Binutils on arm : pls advice me how to proceed

Nick Clifton wrote:
Hi Pedro, Hi Danny,

Please accept my apologies in taking so long to reply to your emails. I have now had a chance to go over them and the patches that they contained and then seemed quite reasonable to me. I have applied them to my local source tree and checked to see if there were any regressions - there were not.

Unfortunately I do not have an arm-wince system at my disposal, so I cannot check that the (slightly revised) versions of the patches that I applied allow working binaries to be created, so please can I ask for your help ?

I am attaching a unified patch which I think contains all of the changes that you suggested, along with a little bit of code tidying. Please could you try applying them to a set of binutils sources (from the mainline of the CVS repository) and testing them to see if they produce working binaries ?

> One thing I am quite worried about is whether partial linking will work. (ie using the "ld -r ...." file to create an object file that is an amalgam of several other object files). I suspect that there might be problems with the -8 bias to branch relocations, but without a test environment I cannot tell for sure.

Made a small test:
Three objects (from main.cpp main2.cpp main3.cpp), one function each, each calls the other in chain, and both all -lc functions (printf).

Linked with:

${OUTFILE}.exe : $(OBJECTS) Makefile
   $(CXX) -v main.o main2.o -nostdlib -r -o partial.o
   $(CXX) -v partial.o main3.o -static $(LDFLAGS) -o ${OUTFILE}.exe

Tested with runtime as dll and with -static.
And it ran ok.

Thanks very much for perserving with your work, and assuming that you can confirm that the patch works, I will be happy to check it in with the ChangeLogs below.

Confirmed. Tested with the tests I sent before, and after rebuilding the full cegcc toolchain, with some c++ tests apps I have.
Many thanks for taking the time to clean and review the patches, and for taking the time to write the ChangeLog.

Pedro Alves

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