<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On 4. Nov 2022, at 22:47, Friedrich Kink <friedrich.kink@fkink.de> wrote:</div><br class="Apple-interchange-newline"><div>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div vlink="#551A8B" text="windowtext" link="#0B6CDA" bgcolor="#ffffff" alink="#EE0000"><p>hmm but I understand the manpage that -b is the linker switch and
binary the input format key word, which is valid see below. And
even I use it like '-Wl,-b,binary` it gives the same error. <br></p></div></div></blockquote><div><br></div><div>how about -Wl,-b -Wl,binary ?</div><div><br></div><div>rgds,</div><div>toomas</div><br><blockquote type="cite"><div><div vlink="#551A8B" text="windowtext" link="#0B6CDA" bgcolor="#ffffff" alink="#EE0000"><p>
</p><p><font face="monospace">objdump -i<br>
BFD header file version (GNU Binutils) 2.39<br>
elf32-i386-sol2<br>
(header little endian, data little endian)<br>
i386<br>
elf32-iamcu<br>
(header little endian, data little endian)<br>
iamcu<br>
coff-i386<br>
(header little endian, data little endian)<br>
i386<br>
pei-i386<br>
(header little endian, data little endian)<br>
i386<br>
elf64-x86-64-sol2<br>
(header little endian, data little endian)<br>
i386<br>
pe-x86-64<br>
(header little endian, data little endian)<br>
i386<br>
pei-x86-64<br>
(header little endian, data little endian)<br>
i386<br>
elf64-little<br>
(header little endian, data little endian)<br>
i386<br>
iamcu<br>
elf64-big<br>
(header big endian, data big endian)<br>
i386<br>
iamcu<br>
elf32-little<br>
(header little endian, data little endian)<br>
i386<br>
iamcu<br>
elf32-big<br>
(header big endian, data big endian)<br>
i386<br>
iamcu<br>
srec<br>
(header endianness unknown, data endianness unknown)<br>
i386<br>
iamcu<br>
symbolsrec<br>
(header endianness unknown, data endianness unknown)<br>
i386<br>
iamcu<br>
verilog<br>
(header endianness unknown, data endianness unknown)<br>
i386<br>
iamcu<br>
tekhex<br>
(header endianness unknown, data endianness unknown)<br>
i386<br>
iamcu<br>
<b><font>binary</font></b><br>
(header endianness unknown, data endianness unknown)<br>
i386<br>
iamcu<br>
ihex<br>
(header endianness unknown, data endianness unknown)<br>
i386<br>
iamcu<br>
plugin<br>
(header little endian, data little endian)<br>
<br>
elf32-i386-sol2 elf32-iamcu coff-i386 pei-i386
elf64-x86-64-sol2<br>
i386 elf32-i386-sol2 ----------- coff-i386 pei-i386
elf64-x86-64-sol2<br>
iamcu --------------- elf32-iamcu --------- --------
-----------------<br>
<br>
pe-x86-64 pei-x86-64 elf64-little elf64-big
elf32-little elf32-big<br>
i386 pe-x86-64 pei-x86-64 elf64-little elf64-big
elf32-little elf32-big<br>
iamcu --------- ---------- elf64-little elf64-big
elf32-little elf32-big<br>
<br>
srec symbolsrec verilog tekhex <b>binary </b>ihex
plugin<br>
i386 srec symbolsrec verilog tekhex <b>binary </b>ihex
------<br>
iamcu srec symbolsrec verilog tekhex <b>binary </b>ihex
------</font><br>
<br>
</p>
<div class="moz-cite-prefix">Am 04.11.2022 um 21:34 schrieb Toomas
Soome:<br>
</div>
<blockquote type="cite" cite="mid:69662CAC-7CF0-46CA-994B-9474021945BB@me.com">
<pre class="moz-quote-pre" wrap="">You pass -b ( to linker) but not “binary”.
Sent from my iPhone
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On 4. Nov 2022, at 22:14, Friedrich Kink via oi-dev <a class="moz-txt-link-rfc2396E" href="mailto:oi-dev@openindiana.org"><oi-dev@openindiana.org></a> wrote:
Hi all,
I try to compile the newest asterisk version, but I get the following linker error:
/usr/gcc/7/bin/gcc -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b binary -o res_geolocation/pidf_lo_test.o res_geolocation/pidf_lo_test.xml
ld: fatal: file binary: open failed: No such file or directory
/usr/gcc/7/bin/gcc -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,--format=binary -o res_geolocation/pidf_lo_test.o res_geolocation/pidf_lo_test.xml
ld: fatal: unrecognized option '--format=binary'
ld: fatal: use the -z help option for usage information
according to the man page (man ld) both variants are allowed, so I'd assume that it works (s. below)
..
-b input-format
--format=input-format
ld may be configured to support more than one kind of object file.
If your ld is configured this way, you can use the -b option to
specify the binary format for input object files that follow this
option on the command line. Even when ld is configured to support
alternative object formats, you don't usually need to specify this,
as ld should be configured to expect as a default input format the
most usual format on each machine. input-format is a text string,
the name of a particular format supported by the BFD libraries.
(You can list the available binary formats with objdump -i.)
You may want to use this option if you are linking files with an
unusual binary format. You can also use -b to switch formats
explicitly (when linking object files of different formats), by
including -b input-format before each group of object files in a
particular format.
The default format is taken from the environment variable
"GNUTARGET".
You can also define the input format from a script, using the
command "TARGET";
Any idea what else could be wrong?
kind regards,
Fritz
_______________________________________________
oi-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev">https://openindiana.org/mailman/listinfo/oi-dev</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap=""></pre>
</blockquote>
</div>
</div></blockquote></div><br></body></html>