This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch]: Discard some sections for pe and pep


2009/11/21 Dave Korn <dave.korn.cygwin@googlemail.com>:
> Kai Tietz wrote:
>> Hello all,
>>
>> we just were falling over the lto sections generated by gcc with lto
>> support. Those section can be discarded by final linkage AFAIU.
>
> ?Hi Kai,
>
> ?What kind of problems were these causing? ?Why does GCC generate LTO
> sections on a platform that I thought doesn't support LTO because it isn't
> ELF-based?

It is possible to use lto on mingw-w64 targets (with some local
adjustments). We are trying to do porting here.

>> Also this patch ensures, that .bss section is getting aligned to a 16
>> byte block, this avoids some issues with sse usage.
>
> ?I don't get this. ?Why isn't __section_alignment__ much greater than 16
> already? ?All the executables I build come out with sections aligned to the
> 4kB page size and individual elements within .bss aligned to 2**5.
Default section alignment is PE_DEF_SECTION_ALIGNMENT, which can be
overiden for pe and pep by ${OVERRIDE_SECTION_ALIGNMENT}, which by the
way seems to be unused, but at very end, it gets 0x1000.
So you are right this part is bogus.
I played to move bss into .data and noticed here a possible alignment
issue, but right this isn't default.

>> About the discarding of section .gnu_debuginfo I am not that sure, but
>> AFAICS it should be ok here, too.
>
> ?Shouldn't this be decided according to whether we're stripping debug info or
> not (i.e. command-line -s/-S options)?
Hmm, well. I thought about this too. In general it should be marked as
debug section and get a NOLOAD as debug. At the moment it seems to be
just undefined for pe/pep.

> ? ?cheers,
> ? ? ?DaveK
>

Cheers,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]