Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv20839
Modified Files:
elf.py
Log Message:
no PHT in relocatable files
Index: elf.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- elf.py 13 Apr 2003 08:47:49 -0000 1.22
+++ elf.py 13 Apr 2003 10:37:40 -0000 1.23
@@ -478,6 +478,7 @@
def make_ELF32_object (text = None, data = None, flags = '',
memory_bottom = 0x08048000):
want_symbols = 's' in flags
+ want_relocatable = 'r' in flags
# Will set given sections' origins.
sections = {}
sections['.text'] = text
@@ -503,16 +504,17 @@
sections['.shstrtab'] = Linkie('<')
sections['.shstrtab'].emit_byte(0)
- phentnames = []
+ if not want_relocatable:
+ phentnames = []
+ for name in shentnames:
+ if guess_ELF32_pflags(name) <> 0:
+ phentnames.append(name)
+ binary.paste(-4, make_ELF32_phtable('<', phentnames))
+
for name in shentnames:
- if guess_ELF32_pflags(name) <> 0:
- phentnames.append(name)
sections['.shstrtab'].place_symbol('#.shstrtab/strings/' + name)
sections['.shstrtab'].emit_string(name)
sections['.shstrtab'].emit_byte(0)
-
- program_header_table = make_ELF32_phtable('<', phentnames)
- binary.paste(-4, program_header_table)
for name in shentnames:
section = sections[name]
|