diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/command.c | 4 | ||||
| -rw-r--r-- | lib/elf_py.c | 2 | ||||
| -rw-r--r-- | lib/xref.h | 13 |
3 files changed, 15 insertions, 4 deletions
diff --git a/lib/command.c b/lib/command.c index 1fae32a04a..6d023142ab 100644 --- a/lib/command.c +++ b/lib/command.c @@ -502,7 +502,7 @@ static int config_write_host(struct vty *vty) else if (cputime_threshold != 5000000) #endif vty_out(vty, "service cputime-warning %lu\n", - cputime_threshold); + cputime_threshold / 1000); if (!walltime_threshold) vty_out(vty, "no service walltime-warning\n"); @@ -512,7 +512,7 @@ static int config_write_host(struct vty *vty) else if (walltime_threshold != 5000000) #endif vty_out(vty, "service walltime-warning %lu\n", - walltime_threshold); + walltime_threshold / 1000); if (host.advanced) vty_out(vty, "service advanced-vty\n"); diff --git a/lib/elf_py.c b/lib/elf_py.c index 75d2d6007f..7c503cfb9d 100644 --- a/lib/elf_py.c +++ b/lib/elf_py.c @@ -293,7 +293,7 @@ static PyObject *elfreloc_getsection(PyObject *self, PyObject *args) if (!w->es) Py_RETURN_NONE; - if (w->symidx == 0) { + if (!w->symvalid || w->symidx == 0) { size_t idx = 0; Elf_Scn *scn; diff --git a/lib/xref.h b/lib/xref.h index 0e3f00f690..37242bd79e 100644 --- a/lib/xref.h +++ b/lib/xref.h @@ -208,8 +208,19 @@ extern const struct xref * const __stop_xref_array[1] DSO_LOCAL; * some build issue with it just add -DFRR_XREF_NO_NOTE to your build flags * to disable it. */ -#ifdef FRR_XREF_NO_NOTE +#if defined(FRR_XREF_NO_NOTE) || defined(__mips64) #define XREF_NOTE "" + +/* mips64 note: MIPS64 (regardless of endianness, both mips64 & mips64el) + * does not have a 64-bit PC-relative relocation type. Unfortunately, a + * 64-bit PC-relative relocation is exactly what the below asm magic emits. + * Therefore, the xref ELF note is permanently disabled on MIPS64. + * + * For some context, refer to https://reviews.llvm.org/D80390 + * + * As noted above, xref extraction still works through the section header + * path, so no functionality is lost. + */ #else #if __SIZEOF_POINTER__ == 4 |
