This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re C4x patch
- To: joel dot sherrill at OARcorp dot com
- Subject: Re C4x patch
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Thu, 23 Dec 1999 12:33:42 -0800
- Cc: GSmart at tennyson dot com dot au, m dot hayes at elec dot canterbury dot ac dot nz, binutils at sourceware dot cygnus dot com
Hi Joel,
I have now had a chance to look at the patch that you sent to me,
and in general it is OK. I cannot just accept that patch however as
there were no Changelog entries to accompany it. If you can supply
these thenm I believe that most of the patch can be applied.
There is one problem with the patch as a whole - it was produced
using 'diff -c' rather than 'diff -p'. The lack of a context for
several of the patch hunks made applying it to the latest sources
rather difficult.
I do also have some specific comments on parts of the patch:
* This patch (to bfd/coffcode.h) would not apply. I could not
locate this code anywhere, so I have left it out.
*** 1068,1078 ****
--- 1068,1080 ----
that is also how gdb locates the section.
We need to handle the .ctors and .dtors sections similarly, to
avoid introducing null words in the tables. */
+ #ifndef C4XMAGIC
if (COFF_DEFAULT_SECTION_ALIGNMENT_POWER > 2
&& (strncmp (section->name, ".stab", 5) == 0
|| strcmp (section->name, ".ctors") == 0
|| strcmp (section->name, ".dtors") == 0))
section->alignment_power = 2;
+ #endif
/* Similarly, the .stabstr section must be aligned to 2**0 at most. */
if (COFF_DEFAULT_SECTION_ALIGNMENT_POWER > 0
* The new function that you added to coffcode.h called
adjust_bf_ef() lacks a comment describing what it does. (ie what
kind of adjustment is it making to bf end ef ?)
* Why have you changed the values of MAXCHUNK and CHUNK in
bfd/srec.c ?
* Why did you make the code to handle s->fix_line at line 745 of
bfd/coffgen.c conditional only on RS6000COFF_C ?
* The patch to fix the dectection of signed overflow in bfd/reloc.c:
_bfd_relocate_contents() could not be applied because this code
has been reworked. I have assumed that no patch is now necessary.
* The patch to add detection of c4x to config.sub was redundant
because this name is already recognised by that script.
* This patch (to gas/config/obj-coff.c) would not apply. I could not
locate the correct place to apply this patch, so I left it out.
*** 279,290 ****
/* @@ How many fields do we want to preserve? Would it make more
sense to pick and choose those we want to copy? Should look
into this further.... [raeburn:19920512.2209EST] */
alent *linenos;
! linenos = coffsymbol (normal->bsym)->lineno;
! memcpy ((char *) &coffsymbol (normal->bsym)->native,
! (char *) &coffsymbol (debug->bsym)->native,
! S_GET_NUMBER_AUXILIARY(debug) * AUXESZ);
coffsymbol (normal->bsym)->lineno = linenos;
}
/* Move the debug flags. */
--- 279,296 ----
/* @@ How many fields do we want to preserve? Would it make more
sense to pick and choose those we want to copy? Should look
into this further.... [raeburn:19920512.2209EST] */
+ combined_entry_type *native;
alent *linenos;
! boolean done_lineno;
!
! native = coffsymbol (debug->bsym)->native;
! coffsymbol (normal->bsym)->native = native;
!
! linenos = coffsymbol (debug->bsym)->lineno;
coffsymbol (normal->bsym)->lineno = linenos;
+
+ done_lineno = coffsymbol (debug->bsym)->done_lineno;
+ coffsymbol (normal->bsym)->done_lineno = done_lineno;
}
/* Move the debug flags. */
* Why does your patch remove a test on flag_m68k_mri at lines 295
and 509 of gas/expr.c ?
* Why did you add a call to ldfile_set_output_arch() in ld/ldfile.c:
ldfile_add_arch() ?
* I have not applied the patches to ld/ldlang.c and ld/ldwrite.c
since they unconditionally change the value of size. These
changes ought to be conditional upon targeting a c4x system. (And
they should be conditional at run time, not compile timne, since
ld may be targeted at multiple hosts).
Anyway Joel - in a seperate email I will send you a gzipped cvs diff
of your patches, applied to the current sourceware sources and with a
few minor bug fixes, compiler warning removals and structure updates
included as well. If anyone else wants a copy of this file, please
let me know.
Cheers
Nick