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: [GOLD] powerpc64 ODR violation check


On 3/7/13, Alan Modra <amodra@gmail.com> wrote:

> - Moving find_shdr to Object requires specifying template parameters
> explicitly since the arguments don't allow a compiler to deduce them.
> I didn't know how to do that using this->find_shdr() syntax, or if it
> is even possible.

You just write
    this->find_shdr<size, big_endian>(...)
Do that instead of the Object::find_shdr approach.

> +  // Find the section header with the given NAME.  If HDR is non-NULL
> +  // then it is a section header returned from a previous call to this
> +  // function and the next section header with the same name will be
> +  // returned.
> +  template<int size, bool big_endian>
> +  const unsigned char*
> +  find_shdr(const unsigned char* /*pshdrs*/, const char* /*name*/,
> +	    const char* /*names*/, section_size_type /*names_size*/,
> +	    const unsigned char* /*hdr*/) const;

You don't need to comment out the parameter names here.

This is OK with those changes.

Thanks.

Ian


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