This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH,GOLD] direct bindings support
- From: Ian Lance Taylor <iant at google dot com>
- To: "Liang, Zhenyu" <zhenyu dot liang at intel dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 11 Mar 2013 10:21:52 -0700
- Subject: Re: [PATCH,GOLD] direct bindings support
- References: <3BEAA04909F60B42BDFC745BF242894615DFB7@SHSMSX101.ccr.corp.intel.com>
On 3/11/13, Liang, Zhenyu <firstname.lastname@example.org> wrote:
> I'm trying to add direct bindings support to GNU binutils. This feature was
> introduced by Solaris linker. See
> http://docs.oracle.com/cd/E19963-01/html/819-0690/gejgf.html for more
> Here is my first patch for gold linker. Currently, support -Bdirect,
> -Bnodirect and -z [direct|nodirect] options.
> Request to review.
This looks pretty good. Do you have a copyright assignment with the
FSF? As far as I know Intel prefers to make copyright assignments on
an individual rather than a company basis.
In general comments should be complete sentences with proper
capitalization and punctuation. A number of new comments needs to be
> + // Return the index of DT_NEEDED should be in the target shared object.
That comment doesn't quite make sense as written. Should "of" be
"that"? Same with the immediately following comment on set_dtndx.
> + bool direct = false;
This variable should be named is_direct.
> + Output_section_data* sidata = new Output_data_fixed_space(index * 4, 4,
> + "** syminfo");
Rather than a hard-coded 4 in "index * 4" I'd prefer to add the struct
to Elf_sizes in elfcpp.h and use that.
> + const section_size_type syminfo_size = dynamic_count * 4;
Use Elf_sizes here too.
> + unsigned char* pi = syminfo_view + (dynsym_index * 4);