objdump read_section_stabs
authorAlan Modra <amodra@gmail.com>
Wed, 15 Feb 2023 10:50:47 +0000 (21:20 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 15 Feb 2023 11:33:30 +0000 (22:03 +1030)
commitf9c36cc99518c74a0562e86e1e27ec46cf57d49a
treed4a840ebc77283e0e045f428d2df820e1c3563b2
parent11066c2aab90138a13ea2a34bee403c5fc38f10c
objdump read_section_stabs

This function is used to read sections other than stabs, and there is
now another version of it that extracts different info from the bfd
section.  Rename it and return the bfd section instead of assorted
fields of the bfd section.

* objcopy.c (read_section): Renamed from read_section_stabs.
Delete size_ptr and entsize_ptr params, add contents param.
Return asection pointer.  Don't unnecessarily free contents on
failure from bfd_malloc_and_get_section.
(find_stabs_section): Use read_section.
(dump_ctf, dump_section_sframe): Likewise.
(read_section_sframe): Delete.
binutils/objdump.c