Author: ros-arm-bringup
Date: Tue Feb 5 14:15:59 2008
New Revision: 32136
URL:
http://svn.reactos.org/svn/reactos?rev=32136&view=rev
Log:
On ARM, it seems first = "true" parsing doesn't actually work in .rbuild
files -- the object is not properly placed in the beginning of the FreeLDR text section.
As a workaround, a special "startup" section is now used to contain the boot.s
code, and a linker flag is used to set this section as the entrypoint section at 0x8000.
FreeLDR for ARM now links properly, with _start at 0x8000.
Modified:
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Tue Feb 5 14:15:59 2008
@@ -3546,12 +3546,24 @@
fprintf ( fMakefile, "\t$(ECHO_LD)\n" );
- fprintf ( fMakefile,
- "\t${gcc} -Wl,--subsystem,native -Wl,-Ttext,0x8000 -o %s %s %s
%s\n",
- backend->GetFullName ( junk_tmp ).c_str (),
- objectsMacro.c_str (),
- linkDepsMacro.c_str (),
- GetLinkerMacro ().c_str ());
+ if (Environment::GetArch() == "arm")
+ {
+ fprintf ( fMakefile,
+ "\t${gcc} -Wl,--subsystem,native -Wl,--section-start,startup=0x8000
-o %s %s %s %s\n",
+ backend->GetFullName ( junk_tmp ).c_str (),
+ objectsMacro.c_str (),
+ linkDepsMacro.c_str (),
+ GetLinkerMacro ().c_str ());
+ }
+ else
+ {
+ fprintf ( fMakefile,
+ "\t${gcc} -Wl,--subsystem,native -Wl,-Ttext,0x8000 -o %s %s %s
%s\n",
+ backend->GetFullName ( junk_tmp ).c_str (),
+ objectsMacro.c_str (),
+ linkDepsMacro.c_str (),
+ GetLinkerMacro ().c_str ());
+ }
fprintf ( fMakefile,
"\t${objcopy} -O binary %s $@\n",
backend->GetFullName ( junk_tmp ).c_str () );