clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

We should probably make it such that if a section has the type 
eSectionTypeAbsoluteAddress that we do the right thing inside the following 
functions:

Section::GetLoadBaseAddress(...);
Section::Slide(...);

SectionLoadList::SetSectionLoadAddress(...);
SectionLoadList::GetSectionLoadAddress(...);
SectionLoadList::SetSectionUnloaded(...);
SectionLoadList::ResolveLoadAddress(...);


================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2092
@@ -2085,3 +2091,3 @@
         SymbolType symbol_type = eSymbolTypeInvalid;
         Elf64_Half symbol_idx = symbol.st_shndx;
 
----------------
This variable has a really bad name. We should change "symbol_idx" to 
"section_idx" and make this const:
```
const Elf64_Half section_idx = symbol.st_shndx;
```

================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2291
@@ +2290,3 @@
+
+        if (symbol_section_sp == nullptr && symbol.st_size != 0)
+        {
----------------
Shouldn't this just be:

```
if (!symbol_section_sp && symbol.st_shndx != SHN_UNDEF  && symbol.st_size != 0)
```

We need to know if a symbol has an address and it only has an address if 
symbol.st_shndx != SHN_UNDEF. All other section types mean that the symbol 
actually has an address


http://reviews.llvm.org/D17450



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to