[PATCH] [RFC] [GOLD] s390 -fsplit-stack support.
Marcin Kościelnicki
koriakin@0x04.net
Sun Dec 13 02:09:00 GMT 2015
On 11/12/15 23:27, Cary Coutant wrote:
>>> I think it's reasonable to expect that a target implementation of
>>> do_calls_non_split may need prelocs, reloc_count, and Output_file*, so
>>> I don't have a problem adding those to the signatures of
>>> Sized_relobj_file::split_stack_adjust,
>>> Sized_relobj_file::split_stack_adjust_reltype,
>>> Target::calls_non_split, and Target::do_calls_non_split.
>>
>> With this patch, we won't have to add the Output_file pointer to these
>> function signatures.
>
> I've also committed the attached patch to add prelocs and reloc_count
> parameters to Target::calls_non_split and Target::do_calls_non_split.
>
> -cary
Thanks for the patches! I've updated mine, and the changes are now
limitted to s390-specific code. The output_view patch has a minor
problem: it returns a const unsigned char *, but I need a read-write
view (I have to bump the frame size in the parameter block). I've just
const_casted around it for now, but I suppose we should change the
return type instead?
Also, I still have an icky static_cast in the "find parameter block"
sequence. but I suppose it's here to stay:
+ Sized_relobj_file<size, true> *object_sized =
+ static_cast<Sized_relobj_file<size, true> *>(object);
+ const Symbol_value<size>* sym =
object_sized->local_symbol(r_sym);
+ bool param_shndx_ordinary;
+ const unsigned int param_shndx =
+ sym->input_shndx(¶m_shndx_ordinary);
+ if (!param_shndx_ordinary)
+ goto bad;
+ param_offset = sym->input_value() + reloc.get_r_addend() - 2
+ -
object->output_section(param_shndx)->address();
+ param_view = const_cast<unsigned char*>(
+ object->get_output_view(param_shndx,
+ ¶m_view_size));
I have also fixed the line lengths and added the ChangeLog.
Btw, this patch shouldn't be landing yet, I still have to finish the gcc
side.
Marcin KoÅcielnicki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gold-Add-s390-fsplit-stack-support.patch
Type: text/x-patch
Size: 55871 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20151213/5752819b/attachment.bin>
More information about the Binutils
mailing list