[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#588391: gcc-4.4: please automatically use -ffunction-sections when necessary with -fPIC



On Fri, Aug 6, 2010 at 11:03 AM, Matthias Klose <doko@debian.org> wrote:
> On 06.08.2010 00:58, brian m. carlson wrote:
>>
>> On Thu, Aug 05, 2010 at 10:59:18PM +0200, Matthias Klose wrote:
>>>
>>> On 08.07.2010 01:42, brian m. carlson wrote:
>>>>
>>>> Package: gcc-4.4
>>>> Version: 4.4.4-6
>>>> Severity: wishlist
>>>>
>>>> Because the ELF ABI for hppa requires relative jumps which are limited
>>>> to 17 bits[0], programs frequently require the use of
>>>> -ffunction-sections.  It would be preferable if (on hppa or otherwise)
>>>> -ffunction-sections were implied by -fPIC when otherwise gcc would
>>>> generate text sections that are too large.  After all, there's really no
>>>> reason to generate .o files that are, for all practical purposes,
>>>> useless.  It would also make numerous package maintainers and hppa
>>>> porters very happy, I suspect.
>>>>
>>>> [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558999#15
>>>
>>> as this specific example shows, -ffunction-sections isn't enough,
>>> but -mlong-calls is needed.
>>
>> In that particular instance -mlong-calls is needed, but in the general
>> case it appears not to be, judging from the numerous cases where only
>> -ffunction-sections (and not -mlong-calls) is in use already in the
>> archive.  For example, #160538.
>>
>> My wishlist request still stands.
>
> waiting for feedback form the HPPA porters.

To make this automatic would require a lot more intelligence in the
linker. My suggestion is to change the specs such that -fPIC implies
-ffunction-sections.

Dave, any comment?

Cheers,
Carlos.



Reply to: