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] [gold] Implement -z stack-size option


>> I'd rename this function to create_stack_segment, since it's no longer
>> just about executable stack info.
>
> Done.
>
>> And it seems to me that it would be cleaner to set the size and
>> alignment directly when creating the segment. I'd just add a new
>> public method Output_segment::set_size_and_alignment(), and call it
>> immediately after calling make_output_segment.
>
> There was already one for alignment, so I just added a set_size method.
> To go with this change, I elided the call to set_offset for PT_GNU_STACK
> rather than making set_offset treat it specially.  Is that what you meant?

Yes.

>> To preserve existing behavior when -z stack-size isn't given,
>> shouldn't we set min_p_align_ only if stack_size() > 0?
>
> That would preserve Gold's existing behavior, which is inconsistent with
> BFD ld's existing behavior.  With my change, Gold's behavior matches BFD
> ld's in all cases (I think).

Sounds good.

This is OK for trunk and 2.27. Thanks!

-cary


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