Skip to content

Commit f6e3e68

Browse files
committed
Remove instruction start
1 parent b596b22 commit f6e3e68

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_aix.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ struct prmap;
2323

2424
namespace __sanitizer {
2525

26-
# if SANITIZER_WORDSIZE == 32
27-
static const uptr InstructionStart = 0x10000000;
28-
# else
29-
static const uptr InstructionStart = 0x100000000;
30-
# endif
31-
3226
struct ProcSelfMapsBuff {
3327
char *data;
3428
uptr mmaped_size;

compiler-rt/lib/sanitizer_common/sanitizer_common.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,7 @@ class LoadedModule {
835835
max_address_(0),
836836
arch_(kModuleArchUnknown),
837837
uuid_size_(0),
838-
instrumented_(false),
839-
instr_start_(0) {
838+
instrumented_(false) {
840839
internal_memset(uuid_, 0, kModuleUUIDSize);
841840
ranges_.clear();
842841
}
@@ -856,8 +855,6 @@ class LoadedModule {
856855
const u8 *uuid() const { return uuid_; }
857856
uptr uuid_size() const { return uuid_size_; }
858857
bool instrumented() const { return instrumented_; }
859-
uptr get_instr_start() const { return instr_start_; }
860-
void set_instr_start(uptr start) { instr_start_ = start; }
861858

862859
struct AddressRange {
863860
AddressRange *next;
@@ -888,7 +885,6 @@ class LoadedModule {
888885
uptr uuid_size_;
889886
u8 uuid_[kModuleUUIDSize];
890887
bool instrumented_;
891-
uptr instr_start_;
892888
IntrusiveList<AddressRange> ranges_;
893889
};
894890

compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@ void MemoryMappingLayout::DumpListOfModules(
152152
uptr base_address = (i ? segment.start : 0) - segment.offset;
153153
LoadedModule cur_module;
154154
cur_module.set(cur_name, base_address);
155-
# if SANITIZER_AIX
156-
// Instructions in AIX shared libraries don't start 0x0.
157-
if (segment.IsShared() && segment.IsExecutable())
158-
cur_module.set_instr_start(InstructionStart);
159-
# endif
160155
segment.AddAddressRanges(&cur_module);
161156
modules->push_back(cur_module);
162157
}

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ void AddressInfo::FillModuleInfo(const char *mod_name, uptr mod_offset,
4646

4747
void AddressInfo::FillModuleInfo(const LoadedModule &mod) {
4848
module = internal_strdup(mod.full_name());
49-
// On some platforms, like on AIX, the first instructions does not start from
50-
// 0x0, we need to addd the start back to get correct instruction offset in
51-
// the objects.
52-
module_offset = address - mod.base_address() + mod.get_instr_start();
49+
module_offset = address - mod.base_address();
5350
module_arch = mod.arch();
5451
if (mod.uuid_size())
5552
internal_memcpy(uuid, mod.uuid(), mod.uuid_size());

0 commit comments

Comments
 (0)