ecoff_object.cc (11320:42ecb523c64a) ecoff_object.cc (11392:5967db4cff04)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 75 unchanged lines hidden (view full) ---

84 bss.size = aoutHdr->bsize;
85 bss.fileImage = NULL;
86
87 DPRINTFR(Loader, "text: 0x%x %d\ndata: 0x%x %d\nbss: 0x%x %d\n",
88 text.baseAddr, text.size, data.baseAddr, data.size,
89 bss.baseAddr, bss.size);
90}
91
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 75 unchanged lines hidden (view full) ---

84 bss.size = aoutHdr->bsize;
85 bss.fileImage = NULL;
86
87 DPRINTFR(Loader, "text: 0x%x %d\ndata: 0x%x %d\nbss: 0x%x %d\n",
88 text.baseAddr, text.size, data.baseAddr, data.size,
89 bss.baseAddr, bss.size);
90}
91
92bool
93EcoffObject::loadAllSymbols(SymbolTable *symtab, Addr base, Addr offset,
94 Addr addr_mask)
95{
96 bool retval = loadGlobalSymbols(symtab, base, offset, addr_mask);
97 retval = retval && loadLocalSymbols(symtab, base, offset, addr_mask);
98 return retval;
99}
92
93bool
100
101bool
94EcoffObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
102EcoffObject::loadGlobalSymbols(SymbolTable *symtab, Addr base, Addr offset,
103 Addr addr_mask)
95{
96 if (!symtab)
97 return false;
98
99 if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
100 warn("loadGlobalSymbols: wrong magic on %s\n", filename);
101 return false;
102 }

--- 12 unchanged lines hidden (view full) ---

115 if (entry->iss != -1)
116 symtab->insert(entry->value, ext_strings + entry->iss);
117 }
118
119 return true;
120}
121
122bool
104{
105 if (!symtab)
106 return false;
107
108 if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
109 warn("loadGlobalSymbols: wrong magic on %s\n", filename);
110 return false;
111 }

--- 12 unchanged lines hidden (view full) ---

124 if (entry->iss != -1)
125 symtab->insert(entry->value, ext_strings + entry->iss);
126 }
127
128 return true;
129}
130
131bool
123EcoffObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
132EcoffObject::loadLocalSymbols(SymbolTable *symtab, Addr base, Addr offset,
133 Addr addr_mask)
124{
125 if (!symtab)
126 return false;
127
128 if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
129 warn("loadGlobalSymbols: wrong magic on %s\n", filename);
130 return false;
131 }

--- 29 unchanged lines hidden ---
134{
135 if (!symtab)
136 return false;
137
138 if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
139 warn("loadGlobalSymbols: wrong magic on %s\n", filename);
140 return false;
141 }

--- 29 unchanged lines hidden ---