Summary: | Linker should check code sequence before TLS optimization | ||
---|---|---|---|
Product: | binutils | Reporter: | H.J. Lu <hjl.tools> |
Component: | ld | Assignee: | unassigned |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | bug-binutils, jakub |
Priority: | P2 | ||
Version: | 2.19 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
H.J. Lu
2007-08-15 21:35:26 UTC
Which compilers violate the TLS ABI? tls.pdf clearly says that the sequences are not optional, if you use the corresponding relocations, you must use them only in the listed sequences. 1. Those sequences may not be optimal in all cases. If compiler knows those optimizations won't be performed, it can generate better sequence. But sometimes compiler may be wrong and we wind up with code sequences which can't not be optimized. 2. Skip those optimizations will not affect the correctness of the program. But performing those optimizations on different sequence will result in bad program. At least, linker shouldn't knowingly generate bad program. Subject: Re: Linker should check code sequence before TLS
optimization
On Thu, Aug 16, 2007 at 01:08:34PM -0000, hjl at lucon dot org wrote:
> 1. Those sequences may not be optimal in all cases. If compiler knows
Then discuss ABI changes, please. ABI documents are not optional to follow!
(In reply to comment #3) > Subject: Re: Linker should check code sequence before TLS > optimization > > On Thu, Aug 16, 2007 at 01:08:34PM -0000, hjl at lucon dot org wrote: > > 1. Those sequences may not be optimal in all cases. If compiler knows > > Then discuss ABI changes, please. ABI documents are not optional to follow! > In this case, linker is generating the final result. This linker "optimization" I am proposing will generate correct output with better performance and without affecting interoperability, which an ABI is used for. . |