Discussion about merging Go frontend
Dave Korn
dave.korn.cygwin@gmail.com
Sat Oct 30 15:05:00 GMT 2010
On 29/10/2010 02:31, Ian Lance Taylor wrote:
> * objfile-coff.c: New file.
A few bugs have cropped up:
> + if (namebuf[0] == '/')
> + {
> + size_t strindex;
> + char *end;
> +
> + strindex = strtol (namebuf, &end, 10);
Needs to be strtol (namebuf + 1, ....
> + /* We don't write out any symbols. We'll see if that causes any
> + problems. */
Not a chance of getting away with that, I'm afraid. Everything expects
there to be file and section symbols and their auxiliaries.
> + set_16 (hdr + offsetof (struct external_filehdr, f_magic), attrs->magic);
> + set_16 (hdr + offsetof (struct external_filehdr, f_magic), nscns);
Cut'n'pasto. Second f_magic should be f_nscns.
> + name_offset += namelen;
Also needs to be namelen + 1.
Attached are the revised version of the file, and a diff to show what I
changed. With this version, all the tests in gcc.dg/lto/lto.exp pass as
before (i.e. there are still a couple of pre-existing FAILs that aren't affected).
cheers,
DaveK
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: objfile-coff.c
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20101030/3be7a351/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coff-fixes.diff
Type: text/x-c
Size: 8844 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20101030/3be7a351/attachment.bin>
More information about the Gcc
mailing list