public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Addition of new option '--rlib' in linker for Renesas SH targets
@ 2006-06-26 13:47 Gina Verlekar
  2006-06-26 15:54 ` Andrew STUBBS
  2006-06-26 17:28 ` Pedro Alves
  0 siblings, 2 replies; 13+ messages in thread
From: Gina Verlekar @ 2006-06-26 13:47 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]


Hi,

The patch attached herewith adds a new option '--rlib' to the linker.
Using this
option, Linker links a Renesas SH library file (created by Renesas
Compiler)	
with GNU object files.
'--rlib' option is supported only for Renesas SH targets.

The format of the option is:
--rlib=<filename >
where 'filename' is the Renesas SH library file to be linked.

This patch converts the Renesas library file into a GNU archive with
name	
<filename>.rlib. This file is created in the same directory as the
Renesas	
library file. This created GNU archive is then passed to the Linker for
further	
processing. 
This option can be used multiple times to link multiple Renesas SH
library	
files.

Patch has been generated for latest snapshot of binutils
(binutils-060621).	
No new regression failures are found.


Changelog

2006-06-26  Gina G. Verlekar  <ginav@kpitcummins.com>

	* lexsup.c: Add --rlib option for linking Renesas SH library
file.	
	* ldrlib.c: Add new file for processing Renesas SH library file.

	* Makefile.in: Modify to include ldrlib.c file for compilation.

	* Makefile.am: Likewise.

	* ld.texinfo: Add documentation for linker option '--rlib'.

	* configdoc.texi: Likewise.	

Any comments will be appreciated.


Regards,
Gina Verlekar
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Free download of GNU based tool-chains for Renesas SH, H8, R8C, M16C and
M32C	
Series.
The following site also offers free technical support to its users.

Visit http://www.kpitgnutools.com for details.

Latest versions of KPIT GNU tools were released on June 1, 2006.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


[-- Attachment #2: rlib.patch.tar.gz --]
[-- Type: application/x-gzip, Size: 9330 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH] Addition of new option '--rlib' in linker for Renesas  SH targets
@ 2006-07-04  8:21 Gina Verlekar
  2006-07-04 11:24 ` Dave Korn
  0 siblings, 1 reply; 13+ messages in thread
From: Gina Verlekar @ 2006-07-04  8:21 UTC (permalink / raw)
  To: Pedro Alves; +Cc: binutils

Hi,

>You could instead have (simplified):

>rlibextract $(renesaslib) $(outputdir)
>ar q librenlib.a $(outputdir)/*
>ld $(objects) -lrenlib

>rlibextract being your new tool.
>It would reduce code duplication,
>you would be able to maintain it with a different release cycle from
>binutils,
>*and* it could be used with older binutils versions.
>Wouldn't this be better? Or am I missing something?

Thank you for your suggestion. 
We agree to you that a separate utility to generate a GNU archive from 
Renesas library file is better idea. We will surely implement it. It
would 
be better to invoke "ar" internally from this utility. This will help
user 
to get GNU archive directly.

Regards,
Gina Verlekar
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
Free download of GNU based tool-chains for Renesas SH, H8, R8C, M16C and
M32C Series.
The following site also offers free technical support to its users.	
Visit http://www.kpitgnutools.com for details.

Latest versions of KPIT GNU tools were released on June 1, 2006.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH] Addition of new option '--rlib' in linker for Renesas  SH targets
@ 2006-07-12 18:08 Nick Clifton
  2006-07-13  5:11 ` Gina Verlekar
  2006-07-24  7:10 ` Gina Verlekar
  0 siblings, 2 replies; 13+ messages in thread
From: Nick Clifton @ 2006-07-12 18:08 UTC (permalink / raw)
  To: GinaV; +Cc: binutils

Hi Gina,

> Please refer to the link below for the patch I had submitted:
> http://sources.redhat.com/ml/binutils/2006-07/msg00068.html

Sorry for the delay in reviewing this patch.

Unfortunately I do not think that it is ready for inclusion into the
sources yet.  The problems that I have with it are:

  * The changes to Makefile.am mean that recreating Makefile.in
    results a warning message about the convrenesaslib_SOURCES being
    defined but not used.  You need to add it to the EXTRA_PROGRAMS
    definition.

  * The copyright comment at the start of convrenesaslib.c has the
    wrong address for the FSF and it says that the tool is part of GLD
    whereas in fact it is part of the GNU Binutils.

  * REPORT_BUGS_TO is defined in the bin-bugs.h header.

  * Having the "magic_num" field of the rlib_header structure be of
    the "unsigned char" type results in compile time warning messages
    when it is used as an argument to strcpy().

  * None of the textual output of the program has been
    internationalized.

  * The --remove-underscore switch is a bad idea.  It would be much
    cleaner and safer if you just invoke "objcopy
    --remove-leading-char" for yourself as a separate step after
    completing the conversion to the GNU ar format.

  * The indentation and formatting do not quite match up to the GNU
    Coding Standard.

  * The use of the program_name array looks very strange to me.  I
    think that it would be much cleaner if you left program_name as
    being the value of argv[0] and you used a different variable when
    you are constructing the ar command line.

  * There are various "magic" constants in some of the malloc() calls
    (eg + 50, or + 100) without any explanation of where they come
    from.  There are also several fixed length arrays that should not
    be fixed (eg filepath, module_name).

  * The fatal() function should be used in place of the
    printf();exit(1); combination currently used.

  * [optional] Adding a --verbose switch would be useful.  It could
    tell the user the command line it is using to invoke "ar", and
    also mention when files are being created and deleted.

  * [optional] A test case to check that the tool works would be very
    helpful.

Cheers
  Nick
  

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-08-06 14:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 13:47 [PATCH] Addition of new option '--rlib' in linker for Renesas SH targets Gina Verlekar
2006-06-26 15:54 ` Andrew STUBBS
2006-06-28 12:33   ` Gina Verlekar
2006-06-26 17:28 ` Pedro Alves
2006-06-28 15:51   ` Pedro Alves
2006-06-29 18:37     ` Dave Korn
2006-07-04  8:21 Gina Verlekar
2006-07-04 11:24 ` Dave Korn
2006-07-07  8:51   ` Gina Verlekar
2006-07-12 18:08 Nick Clifton
2006-07-13  5:11 ` Gina Verlekar
2006-07-24  7:10 ` Gina Verlekar
2006-08-06 14:34   ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).