This is the mail archive of the 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: [GOLD] powerpc linker generated .eh_frame

On Wed, Feb 27, 2013 at 12:37 AM, Alan Modra <> wrote:
>         * target.h (Target::plt_fde_location, do_plt_fde_location): Declare.
>         * (Target::do_plt_fde_location): New function.
>         * ehframe.h (class FDE): Add post_map field to u_.from_linker,
>         accessor function, and constructor param.
>         (class Post_fde, Post_fdes): Declare.
>         (Cie::write): Add post_fdes param.
>         * (Fde::write): Use plt_fde_location.
>         (class Post_fde): Define.
>         (Cie::write): Stash FDEs added post merge mapping.
>         (Eh_frame::add_ehframe_for_plt): Assert no new CIEs after mapping.
>         Adjust Fde constructor call.  Bump final_data_size_ for post map FDEs.
>         (Eh_frame::do_sized_write): Arrange to write post map FDES after
>         other FDEs.
>         * (Target_powerpc::do_plt_fde_location): New function.
>         (Target_powerpc::has_glink): New function.
>         (Target_powerpc::do_relax): Add eh_frame info for stubs.
>         (struct Eh_cie, eh_frame_cie, glink_eh_frame_fde_64,
>         glink_eh_frame_fde_32, default_fde): New data.
>         (Stub_table::eh_frame_added_): New var.
>         (Stub_table::find_long_branch_entry, stub_address, stub_offset):
>         Make const.
>         (Stub_table::add_eh_frame): New function.
>         (Output_data_glink::add_eh_frame): New function.
>         (Target_powerpc::make_glink_section): Call add_eh_frame.

> +class Post_fde
> +{
> + public:

Add a comment for this class.

> +  Post_fde(Fde* fde, section_offset_type cie_offset, unsigned char fde_encoding)
> +    : fde_(fde), cie_offset_(cie_offset), fde_encoding_(fde_encoding)
> +  { }
> +
> +  ~Post_fde();

I don't see where this is defined.  I also don't see why the default
destructor isn't fine.  Can you just omit this line?

> +  Fde* fde_;
> +  section_offset_type cie_offset_;
> +  unsigned char fde_encoding_;
> +};

Make the class member variables private.  Or make this a struct, in
which case remove the trailing underscores from the field names.

This is OK with those changes.



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