object_file.hh (11391:484c04261226) | object_file.hh (11392:5967db4cff04) |
---|---|
1/* 2 * Copyright (c) 2002-2004 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; --- 68 unchanged lines hidden (view full) --- 77 OpSys opSys; 78 79 ObjectFile(const std::string &_filename, size_t _len, uint8_t *_data, 80 Arch _arch, OpSys _opSys); 81 82 public: 83 virtual ~ObjectFile(); 84 | 1/* 2 * Copyright (c) 2002-2004 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; --- 68 unchanged lines hidden (view full) --- 77 OpSys opSys; 78 79 ObjectFile(const std::string &_filename, size_t _len, uint8_t *_data, 80 Arch _arch, OpSys _opSys); 81 82 public: 83 virtual ~ObjectFile(); 84 |
85 virtual bool loadSections(PortProxy& memProxy, Addr addrMask = 86 std::numeric_limits<Addr>::max(), 87 Addr offset = 0); 88 virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask = 89 std::numeric_limits<Addr>::max()) = 0; 90 virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask = 91 std::numeric_limits<Addr>::max()) = 0; 92 virtual bool loadWeakSymbols(SymbolTable *symtab, Addr addrMask = 93 std::numeric_limits<Addr>::max()) | 85 static const Addr maxAddr = std::numeric_limits<Addr>::max(); 86 87 virtual bool loadSections(PortProxy& mem_proxy, 88 Addr mask = maxAddr, Addr offset = 0); 89 90 virtual bool loadAllSymbols(SymbolTable *symtab, Addr base = 0, 91 Addr offset = 0, Addr mask = maxAddr) = 0; 92 virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr base = 0, 93 Addr offset = 0, Addr mask = maxAddr) = 0; 94 virtual bool loadLocalSymbols(SymbolTable *symtab, Addr base = 0, 95 Addr offset = 0, Addr mask = maxAddr) = 0; 96 virtual bool loadWeakSymbols(SymbolTable *symtab, Addr base = 0, 97 Addr offset = 0, Addr mask = maxAddr) |
94 { return false; } 95 96 virtual ObjectFile *getInterpreter() const { return nullptr; } 97 virtual bool relocatable() const { return false; } 98 virtual Addr mapSize() const 99 { panic("mapSize() should only be called on relocatable objects\n"); } 100 virtual void updateBias(Addr bias_addr) 101 { panic("updateBias() should only be called on relocatable objects\n"); } --- 14 unchanged lines hidden (view full) --- 116 117 Addr entry; 118 Addr globalPtr; 119 120 Section text; 121 Section data; 122 Section bss; 123 | 98 { return false; } 99 100 virtual ObjectFile *getInterpreter() const { return nullptr; } 101 virtual bool relocatable() const { return false; } 102 virtual Addr mapSize() const 103 { panic("mapSize() should only be called on relocatable objects\n"); } 104 virtual void updateBias(Addr bias_addr) 105 { panic("updateBias() should only be called on relocatable objects\n"); } --- 14 unchanged lines hidden (view full) --- 120 121 Addr entry; 122 Addr globalPtr; 123 124 Section text; 125 Section data; 126 Section bss; 127 |
124 bool loadSection(Section *sec, PortProxy& memProxy, Addr addrMask, | 128 bool loadSection(Section *sec, PortProxy& mem_proxy, Addr mask, |
125 Addr offset = 0); 126 void setGlobalPointer(Addr global_ptr) { globalPtr = global_ptr; } 127 128 public: 129 Addr entryPoint() const { return entry; } 130 131 Addr globalPointer() const { return globalPtr; } 132 --- 20 unchanged lines hidden --- | 129 Addr offset = 0); 130 void setGlobalPointer(Addr global_ptr) { globalPtr = global_ptr; } 131 132 public: 133 Addr entryPoint() const { return entry; } 134 135 Addr globalPointer() const { return globalPtr; } 136 --- 20 unchanged lines hidden --- |