freebsd-dev/usr.sbin/kldxref
Warner Losh ee150a3376 Use EF_SEG_READ_STRING instead of EF_SEG_READ when reading strings.
Normally, we can get away with just reading the 1k buffer for the
string, since the placement of the data is generally no where near the
end of the file. However, it's possible that the string is within the
last 1k of the file, in which case the read will fail, and we'll not
produce the proper records needed for devmatch to work. By reading
using EF_SEG_READ_STRING, we automatically work around these problems
while still retaining safety.

This fix a problem with devmatch where we wouldn't load certain
modules (like ums). This didn't always happen (my tree didn't exhibit
it, while nathan's did because his optimization options were more
agressive).

Reported by: nathanw@
2018-07-15 05:29:39 +00:00
..
ef_aarch64.c kldxref: improve style(9) 2018-01-17 19:59:43 +00:00
ef_amd64.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ef_i386.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ef_nop.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ef_obj.c kldxref: improve style(9) 2018-01-17 19:59:43 +00:00
ef_powerpc.c Adjust format string to fix build. 2018-01-18 00:24:05 +00:00
ef_sparc64.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ef.c kldxref: additional sytle(9) cleanup 2018-01-17 20:43:30 +00:00
ef.h kldxref: handle modules with md_cval at the end of allocated sections 2018-01-16 18:20:12 +00:00
fileformat
kldxref.8
kldxref.c Use EF_SEG_READ_STRING instead of EF_SEG_READ when reading strings. 2018-07-15 05:29:39 +00:00
Makefile Remove -fno-strict-alias, as it is no longer needed. 2014-12-18 16:57:19 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00