<div dir="ltr"><div><div><div>Hi,<br><br>You're passing an option that's only valid for gnu ld, but the ld in use<br></div>is the illumos one.<br><br></div>Presumably you're picking up the gnu ld manual page because of the way<br>your PATH is set, but gcc is explicitly configured to use a particular ld<br></div>(and as - see the output of 'gcc -v' for how it's configured) rather than picking<br>it out of the PATH.<br><div><div><div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 4, 2022 at 8:14 PM Friedrich Kink via oi-dev <<a href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I try to compile the newest asterisk version, but I get the following <br>
linker error:<br>
<br>
/usr/gcc/7/bin/gcc -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b <br>
binary -o res_geolocation/pidf_lo_test.o res_geolocation/pidf_lo_test.xml<br>
ld: fatal: file binary: open failed: No such file or directory<br>
<br>
/usr/gcc/7/bin/gcc -g -nostartfiles -nodefaultlibs -nostdlib -r <br>
-Wl,--format=binary -o res_geolocation/pidf_lo_test.o <br>
res_geolocation/pidf_lo_test.xml<br>
ld: fatal: unrecognized option '--format=binary'<br>
ld: fatal: use the -z help option for usage information<br>
<br>
according to the man page (man ld) both variants are allowed, so I'd <br>
assume that it works (s. below)<br>
<br>
..<br>
<br>
<br>
-b input-format<br>
--format=input-format<br>
ld may be configured to support more than one kind of object <br>
file.<br>
If your ld is configured this way, you can use the -b option to<br>
specify the binary format for input object files that follow <br>
this<br>
option on the command line. Even when ld is configured to <br>
support<br>
alternative object formats, you don't usually need to <br>
specify this,<br>
as ld should be configured to expect as a default input <br>
format the<br>
most usual format on each machine. input-format is a text <br>
string,<br>
the name of a particular format supported by the BFD libraries.<br>
(You can list the available binary formats with objdump -i.)<br>
<br>
You may want to use this option if you are linking files with an<br>
unusual binary format. You can also use -b to switch formats<br>
explicitly (when linking object files of different formats), by<br>
including -b input-format before each group of object files in a<br>
particular format.<br>
<br>
The default format is taken from the environment variable<br>
"GNUTARGET".<br>
<br>
You can also define the input format from a script, using the<br>
command "TARGET";<br>
<br>
Any idea what else could be wrong?<br>
<br>
kind regards,<br>
<br>
Fritz<br>
<br>
<br>
_______________________________________________<br>
oi-dev mailing list<br>
<a href="mailto:oi-dev@openindiana.org" target="_blank">oi-dev@openindiana.org</a><br>
<a href="https://openindiana.org/mailman/listinfo/oi-dev" rel="noreferrer" target="_blank">https://openindiana.org/mailman/listinfo/oi-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">-Peter Tribble<br><a href="http://www.petertribble.co.uk/" target="_blank">http://www.petertribble.co.uk/</a> - <a href="http://ptribble.blogspot.com/" target="_blank">http://ptribble.blogspot.com/</a></div></div></div></div></div>