aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-06-11 14:00:21 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-06-11 16:22:51 -0400
commitab482e0d6c80e74be9b974b9b2e896ebf9a21e1c (patch)
tree1634b8ac60be2b2a26955fbb569b10f93fc0da22 /scripts
parent38729bc37417310ad9606617b8e56f258e69ad7d (diff)
downloadseabios-hppa-ab482e0d6c80e74be9b974b9b2e896ebf9a21e1c.zip
seabios-hppa-ab482e0d6c80e74be9b974b9b2e896ebf9a21e1c.tar.gz
seabios-hppa-ab482e0d6c80e74be9b974b9b2e896ebf9a21e1c.tar.bz2
build: Get fixed address variables from 32bit compile pass (not 16bit)
Update the layoutrom.py build script so that fixed address sections can come from the 32bit compiled C code. Update the C code so that all VAR16FIXED variables instead use the new VARFSEGFIXED which is defined in 32bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/layoutrom.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py
index ba557e6..0fbec25 100755
--- a/scripts/layoutrom.py
+++ b/scripts/layoutrom.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# Script to analyze code and arrange ld sections.
#
-# Copyright (C) 2008-2010 Kevin O'Connor <kevin@koconnor.net>
+# Copyright (C) 2008-2014 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
@@ -179,7 +179,7 @@ def doLayout(sections, config, genreloc):
textsections = getSectionsPrefix(sections16, '.text.')
rodatasections = getSectionsPrefix(sections16, '.rodata')
datasections = getSectionsPrefix(sections16, '.data16.')
- fixedsections = getSectionsPrefix(sections16, '.fixedaddr.')
+ fixedsections = getSectionsCategory(sections, 'fixed')
firstfixed = fitSections(fixedsections, textsections)
remsections = [s for s in textsections+rodatasections+datasections
@@ -643,7 +643,7 @@ def main():
else:
entrysym = symbols['16'].get('reset_vector')
anchorsections = [entrysym.section] + [
- section for section in info16[0]
+ section for section in allsections
if section.name.startswith('.fixedaddr.')]
keepsections = findReachable(anchorsections, checkKeep, symbols)
sections = [section for section in allsections if section in keepsections]
@@ -652,13 +652,15 @@ def main():
anchorsections = [
section for section in sections
if ('.data.varlow.' in section.name or '.data.varfseg.' in section.name
- or '.runtime.' in section.name)]
+ or '.fixedaddr.' in section.name or '.runtime.' in section.name)]
runtimesections = findReachable(anchorsections, checkRuntime, None)
for section in sections:
if section.name.startswith('.data.varlow.'):
section.category = '32low'
elif section.name.startswith('.data.varfseg.'):
section.category = '32fseg'
+ elif section.name.startswith('.fixedaddr.'):
+ section.category = 'fixed'
elif section.fileid == '32flat' and section not in runtimesections:
section.category = '32init'
else: