This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold][aarch64]patch3: static link/shared objects
- From: Cary Coutant <ccoutant at google dot com>
- To: HÃn ShÄn (ææ) <shenhan at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Doug Kwan <dougkwan at google dot com>, Jing Yu <jingyu at google dot com>
- Date: Fri, 29 Aug 2014 15:50:18 -0700
- Subject: Re: [gold][aarch64]patch3: static link/shared objects
- Authentication-results: sourceware.org; auth=none
- References: <CACkGtrhPdfHQSNKxOd0S0RZJDm3tnEjmbvLOjiUtC2mcbqHEUQ at mail dot gmail dot com>
> 2014-08-11 Han Shen <shenhan@google.com>
> Jing Yu <jingyu@google.com>
>
> * gold/aarch64-reloc-property.cc(AArch64_reloc_property_table::reloc_name_in_error_message):
> Fix bug in reference reloc property in the table.
> * gold/aarch64-reloc.def: Add TLSLE reloc types and fix some errors in
> 3 other entries.
> * gold/aarch64.cc:
> (TARGET_TCB_SIZE): New macro defining how tcb size is computed.
> (Output_data_got_aarch64::add_static_reloc): 2 new methods
> (overloaded version).
> (Output_data_got_aarch64::do_write): Add code to write out static relocs.
> (class Output_data_got_aarch64::Static_reloc): New class to wrap
> static relocs.
> (Output_data_got_aarch64::static_relocs): New vector to hold static relocs.
> (Target_aarch64::tcb_size): New method.
> (Target_aarch64::Relocate::relocate): Add code handling new reloc types.
> (Target_aarch64::Relocate::relocate_tls): New method.
> (Target_aarch64::Scan::local): Add code handling new reloc types.
> (Target_aarch64::Scan::global): Add code handling new reloc types.
Your patch includes the top-level configure patches. Those need to go
to GCC first; I'll take care of adding both aarch64 and mips at the
same time.
The ChangeLog entries shouldn't have "gold/" in the filenames.
+#define TARGET_TCB_SIZE ((size / 8) * 2)
I'm uncomfortable having a file-scope macro that refers to a template
parameter. Can't you just have a static const int TCB_SIZE in
Target_aarch64, and refer to it from the Output_data_got_aarch64 class
as Target_aarch64<size, big_endian::TCB_SIZE?
+ unsigned int
+ tcb_size() const { return this->tcb_size_; }
You can just return This::TCB_SIZE here (with a suitable typedef for This).
+ // Size of TCB
+ const unsigned int tcb_size_;
And this field can go away.
This is OK with the above changes. Thanks!
-cary