Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv25579
Modified Files:
Makefile.am elf.py
Log Message:
set section origins to 0 in relocatable files
Index: Makefile.am
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.am 12 Apr 2003 11:17:57 -0000 1.8
+++ Makefile.am 14 Apr 2003 00:05:18 -0000 1.9
@@ -12,4 +12,4 @@
all:
clean: clean-am
- -rm -f *~ *.pyc *.pyo *.exe a.out hello hellowosym
+ -rm -f *.exe *.o *.pyc *.pyo *~ a.out hello hellowosym
Index: elf.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- elf.py 13 Apr 2003 23:40:56 -0000 1.24
+++ elf.py 14 Apr 2003 00:05:18 -0000 1.25
@@ -535,7 +535,9 @@
offset = binary.filesz()
- if p_flags <> 0:
+ if 'r' in flags or p_flags == 0:
+ section.set_origin(0)
+ else:
address = memory_boundary | (offset & 0xFFF)
# take into account alignments larger than a page
address = (address + alignment - 1) & ~(alignment - 1)
@@ -543,8 +545,6 @@
binary.place_symbol('#' + name + '/p_type', guess_ELF32_ptype(name))
section.set_origin(address)
binary.place_symbol('&' + name, address)
- else:
- address = None
binary.place_symbol('#' + name + '/memsz', section.memsz())
binary.place_symbol('#' + name + '/filesz', section.filesz())
|