labath added a comment.

In D55998#1340711 <https://reviews.llvm.org/D55998#1340711>, @joerg wrote:

> In D55998#1340448 <https://reviews.llvm.org/D55998#1340448>, @jankratochvil 
> wrote:
>
> > ELF standard <http://refspecs.linuxbase.org/elf/elf.pdf>: "//An object file 
> > segment contains one or more sections.//", "//An object file segment 
> > comprises one or more sections//"
>
>
> I wouldn't rule out smart tools splitting a section into a read-only and 
> read-write part on linking. So no, I certainly wouldn't assume any direct 
> correspondance between segments and sections.


That's interesting. Do you know of any such tool doing that? I am asking 
because that might give us a clue on how to handle that situation. In your 
example, it might be cleanest to split the offending section in two, and place 
the parts in appropriate segments (with the right permissions). However, I 
don't want to add code doing that if there is no known tool producing such 
files. If there aren't any (and I hope that there aren't, since it does appear 
to violate the spec), then I think we should just do the minimal amount of work 
necessary to process these (corrupt?) files without doing something completely 
bogus (like crashing). I think the current implementation would fit that bill.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55998/new/

https://reviews.llvm.org/D55998



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

Reply via email to