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: PR 11304, --section-start and orphans


On Wed, Feb 24, 2010 at 7:52 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Feb 24, 2010 at 12:46:36AM +1030, Alan Modra wrote:
>> On Mon, Feb 22, 2010 at 10:38:04PM +1030, Alan Modra wrote:
>> > ? ? PR ld/11304
>> > ? ? * ldlang.c (exp_init_os): Delete forward declaration.
>> > ? ? (init_os): Don't check for bfd_section already created and don't
>> > ? ? init addr_tree and load_base expressions here.
>> > ? ? (map_input_to_output_sections): Only map input to output sections
>> > ? ? and set constraints here, and as an exception, create output
>> > ? ? sections which have their address set. ?Move all the other code to..
>> > ? ? (create_other_output_sections): ..here. ?New function. ?Handle init
>> > ? ? of addr_tree and load_base here too.
>> > ? ? (lang_process): Call create_other_output_sections.
>>
>> I'm reverting this patch due to the testsuite failures it causes. ?I
>> was hoping to have them all fixed today, but that isn't going to
>> happen, and I'm finding the patch needs some major tweaking..
>
> This patch takes a different approach: ?Move the
> _bfd_elf_init_private_section_data call to lang_add_section, where we
> can ensure it is called on the first input section added to an output
> section. ?init_os wasn't the proper place for this call since init_os
> can be called for data statements and expressions referencing the
> output section, and those may occur before we see the first input
> section. ?I also noticed that we didn't actually clear the link-once
> flags as the comment in lang_add_section said, at least if the
> link-once section was the first assigned to an output section. ?Fixing
> that required a tweak to _bfd_elf_init_private_section_data. ?HJ, I
> took out the !osec->flags test in this function. ?I believe that was
> for the linker rather than objcopy, so should no longer be necessary.
>

Sure. I will check it later and report any problems if there are any.

Thanks.


-- 
H.J.


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