Fix verilog output when the width is > 1.
authorNick Clifton <nickc@redhat.com>
Thu, 1 Dec 2022 13:09:26 +0000 (13:09 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 1 Dec 2022 13:09:26 +0000 (13:09 +0000)
commit6ef35c04dffe685ece08212201c4c032baf8aa86
tree3eba01220e92f2f24152d4ad94f4be8c45c9f53b
parent7505bb034c7c8a3d9ecf34e22777114c8bc4a93e
Fix verilog output when the width is > 1.

PR 25202
bfd * bfd.c (VerilogDataEndianness): New variable.
(verilog_write_record): Use VerilogDataEndianness, if set, to
choose the endianness of the output.
(verilog_write_section): Adjust the address by the data width.

binutils* objcopy.c (copy_object): Set VerilogDataEndianness to the
endianness of the input file.
(copy_main): Verifiy the value set by the --verilog-data-width
option.
* testsuite/binutils-all/objcopy.exp: Add tests of the new behaviour.
* testsuite/binutils-all/verilog-I4.hex: New file.
bfd/ChangeLog
bfd/verilog.c
binutils/ChangeLog
binutils/objcopy.c
binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/binutils-all/verilog-I4.hex [new file with mode: 0644]