mirror of
https://github.com/reactos/reactos.git
synced 2025-03-10 18:24:02 +00:00
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. svn path=/trunk/; revision=32136
This commit is contained in:
parent
b9ad8e61be
commit
8a8e8285a9
1 changed files with 18 additions and 6 deletions
|
@ -3546,12 +3546,24 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget ()
|
|||
|
||||
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 () );
|
||||
|
|
Loading…
Reference in a new issue