Mail Archives: cygwin/2001/11/30/16:11:23
Maybe I'm wrong but this sounds like a question for the binutils list,
although maybe someone here knows the answer too.
Larry Hall lhall AT rfk DOT com
RFK Partners, Inc. http://www.rfk.com
838 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
At 03:54 PM 11/30/2001, KMcconlogu AT aol DOT com wrote:
>The following is the behavior observed using the included test inputs (x.c & x.script below). Given the data below, is the Cygwin port of ld expected to support "binary" and/or "ihex" ld OUTPUT_FORMATS(). As an aside, a native Red Hat Linux host was used to test the same inputs, the results were as one would expect, i.e. a raw binary format in x.out and an Intel HEX Format in x.out respectively. Furthermore, searches in FAQs did not yield such an observation nor did searching the documentation set an expectation of not being supported. Of course, I could have overlooked something,
>
>Please advise.
>
>thank you
>
>
>When OUTPUT_FORMAT("binary") is uncommented ld does this:
>
><133> !ld
>ld -T x.script x.o -o x.out
> 0 [main] ld 1372 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
> 3520 [main] ld 1372 stackdump: Dumping stack trace to ld.exe.stackdump
>Segmentation fault (core dumped)
>
>When OUTPUT_FORMAT("ihex") is uncommented ld does this:
><135> !ld
>ld -T x.script x.o -o x.out
>ld: PE operations on non PE file.
>
>objdump -i produces this:
>
><136> objdump -i
>BFD header file version 2.10.91
>pe-i386
> (header little endian, data little endian)
> i386
>pei-i386
> (header little endian, data little endian)
> i386
>elf32-i386
> (header little endian, data little endian)
> i386
>elf32-little
> (header little endian, data little endian)
> i386
>elf32-big
> (header big endian, data big endian)
> i386
>srec
> (header endianness unknown, data endianness unknown)
> i386
>symbolsrec
> (header endianness unknown, data endianness unknown)
> i386
>tekhex
> (header endianness unknown, data endianness unknown)
> i386
>binary
> (header endianness unknown, data endianness unknown)
> i386
>ihex
> (header endianness unknown, data endianness unknown)
> i386
>
> pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec
> i386 pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec
>
> symbolsrec tekhex binary ihex
> i386 symbolsrec tekhex binary ihex
>
>
>x.c:
>x(void) {
> char c;
>
> c += 1;
>}
>x.script:
>/*
>#OUTPUT_FORMAT("binary")
>#OUTPUT_FORMAT("ihex")
>*/
>
>
>ENTRY (__reset);
>
>MEMORY
> {
> rom (rx) : ORIGIN = 0, LENGTH = 256k
> ram (!rx) : ORIGIN = 0x00000000, LENGTH = 4M
> }
>
>SECTIONS {
> .text 0x00000400 : {
> _btext = .; *(.text); _etext = .;
> }
>
> .data1 ADDR(.text) + SIZEOF(.text) :
> {
> _bdata1 = .; *(.data1); _edata1 = .;
> }
> .data ADDR(.data1) + SIZEOF(.data1) :
> {
> _bdata = .; *(.data); _edata = .;
> }
>
> .bss ADDR(.data) + SIZEOF(.data) :
> {
> *(.bss); _edata = .;
> }
> .startup ADDR(.data) + SIZEOF(.data) :
> {
> *(.startup)
> }
> .reset 0xffffff00 :
> {
> *(.reset)
> }
> .ivt 0x00000000 :
> {
> _bivt = .; *(.ivt)
> }
>
>}
>
>
>
>
>--
>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting: http://cygwin.com/bugs.html
>Documentation: http://cygwin.com/docs.html
>FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -