Hi,
thank you very much for this explanation (also all others). Indeed I
used the wrong man page. Reading the right man page it seems that this
mimic is not easily transferable to Solaris/illumos. Now I need to check
the intention and how this can be achieved in the Solaris/illumos world.
At least now I learnt something new ;-).
kind regards,
Fritz
Am 04.11.2022 um 21:56 schrieb Peter Tribble:
Hi,
You're passing an option that's only valid for gnu ld, but the ld in use
is the illumos one.
Presumably you're picking up the gnu ld manual page because of the way
your PATH is set, but gcc is explicitly configured to use a particular ld
(and as - see the output of 'gcc -v' for how it's configured) rather
than picking
it out of the PATH.
On Fri, Nov 4, 2022 at 8:14 PM Friedrich Kink via oi-dev
<oi-dev@openindiana.org> 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
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev
--
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev
_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev