This is the mail archive of the binutils@sources.redhat.com 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: telling symbols defined only in the linker script


On Mar  1, 2004, Nick Clifton <nickc@redhat.com> wrote:

> Since this is specific to the FRV backend it is OK - but I would
> suggest adding a comment at a suitable point saying something like
> "comment out this section if you need increased FRV linker performance
> and are sure that you will not be getting corrupt relocs".

The point is that there's no single section that could be commented
out.  It's the additional fields used to count relocs and rofixups on
a per-entry basis, and the additional arguments passed to functions to
enable the functions that emit the relocs and fixups to tell which
entry they should against.  They'd be otherwise unused.

>> +#if 0
>> +  /* These are set in _frv_count_got_plt_entries() or later, and this
>> +     function is only called in _frv_resolve_final_relocs_info(), that
>> +     runs just before it, so we don't have to worry about the fields
>> +     below.  */

> What is the point of adding suppressed code ?  If you want it there
> for future enablement or debugging purposes then there should at least
> be comment explaining this.

Err...  Isn't it already sufficiently explained in the comment above?
Or am I missing your point?

>> +		{
>> +		  info->callbacks->warning
>> +		    (info, "LINKER BUG: .rofixup section size mismatch",
>> +		     ".rofixup", NULL, NULL, 0);
>> +		  abort ();
>> +		  return FALSE;
>> +		}

> I do not like the idea of having the abort() here.

I copied it from elsewhere, after finding out it expanded to a call to
a function that just printed a linker internal error message.  Which
is why it has to be followed by `return FALSE'.

> If at all possible the BFD library should never abort

It doesn't.

> +  BFD_ASSERT (entry->dynrelocs > 0);

> +      BFD_ASSERT (entry->fixups > 0);

> On similar grounds I would prefer not to see BFD_ASSERTs added to the
> code.

BFD_ASSERT doesn't abort either; it just prints a warning message.  It
doesn't interrupt the linking, prevent the output from being produced
nor even product an failure status.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Happy GNU Year!                     oliva@{lsd.ic.unicamp.br, gnu.org}
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist                Professional serial bug killer


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