[PATCH] D29278: [ELF] Bypass section type check #2

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 01:22:02 PST 2017


bd1976llvm added a comment.

discussion continued via email:

  Rafael Avila de Espindola <rafael.espindola at gmail.com>
  5:49 PM (15 hours ago)
  
  to reviews+D29278., eleviant, ruiu, seifsta, me, llvm-commits, ikudrin.dev, grimar, adhemerval.zan. 
  ben via Phabricator <reviews at reviews.llvm.org> writes:
  
  > bd1976llvm added a comment.
  >
  > I think these checks exist, because of this line from the gabi.
  >
  >   In the first phase, input sections that match in name, type and attribute flags should be concatenated into single sections.
  >
  > However, it should be noted that this is followed by an note that states that linkers are only **recommended ** to follow this approach.
  >
  > AFAIR: at least gnu does not follow this rule. Also, I am aware of many codebases (games) with hand written asm which does not set the section flags correctly. This is not always easy to fix. Perhaps this asm is in a third party library etc..
  >
  > Being permissive on this can be very helpful to users.
  
  And that is the idea of the white list. It makes us as permissive as we
  need. I also don't see the point for different levels depending on
  linker scripts being used or not.
  
  Cheers,
  Rafael
  
  bd1976 llvm <bd1976llvm at gmail.com>
  6:19 PM (15 hours ago)
  
  to Rafael 
  Unless your not permissive enough! Most permissive is just to obey the linker script and warn if doing so might cause issues. The tool gains more functionality and doesn't sacrifice safety. Linker script primacy FTW :)
  
  
  Rafael Avila de Espindola
  6:25 PM (14 hours ago)
  
  to me 
  That means we would never find out if something we are allowing is
  needed and way. We should not extend the white list unless there is a
  good reason for it.


Repository:
  rL LLVM

https://reviews.llvm.org/D29278





More information about the llvm-commits mailing list