https://sourceware.org/bugzilla/show_bug.cgi?id=32896

--- Comment #10 from Matthew Malcomson <mmalcomson at nvidia dot com> ---
(In reply to H.J. Lu from comment #9)
> (In reply to Matthew Malcomson from comment #8)
> > (In reply to H.J. Lu from comment #6)
> > > (In reply to Matthew Malcomson from comment #5)
> > > > I think that this proposed patch could allow putting the PT_TLS segment
> > > > offset past the end of the file (that I think was a problem in
> > > > https://sourceware.org/bugzilla/show_bug.cgi?id=12921 ).
> > > > 
> > > > This because it doesn't adjust the `off` that indicates position into 
> > > > the
> > > > file.
> > > 
> > > The updated patch is at:
> > > 
> > > https://sourceware.org/pipermail/binutils/2025-April/140755.html
> > 
> > I had a look at this patch, and it does seem to ensure that the PT_TLS
> > segment has the correct alignment requirements.
> > 
> > I noticed that with this patch one can end up with a very large PT_TLS
> > filesize if you re-order the .tbss and .tdata sections.  Not sure whether
> > this would be problematic in some way.  I did have to use a testcase that
> > was triggering a linker warning so it may be invalid.
> > 
> 
> Please try
> 
> https://sourceware.org/pipermail/binutils/2025-April/140767.html
> 
> on the current master branch.


That has the same behaviour to do with a large filesz for the PT_TLS segment.
The testcase here makes the .tbss section go before the .tdata section with an
artificial linker script.

(I needed that order to trick the file size check in
`assign_file_positions_for_non_load_sections` since that function will take the
starting file position from a NOBITS section but will not take the ending file
position from a NOBITS section).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to