Skip to content

Commit 834b371

Browse files
committed
enqueue-library.c: Use NT_FDO_DLOPEN_METADATA instead of NT_FDO_PACKAGING_METADATA
The NT_FDO_DLOPEN_METADATA section must be used to specify dependencies in the elf section. This was changed by accident and resulted in a complete breakdown of the dependency search functionality. Fixes: e61089c ("enqueue-library.c: Use libc NT_FDO_PACKAGING_METADATA definition") Signed-off-by: Alexey Gladkov <[email protected]>
1 parent 66dff2c commit 834b371

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/initrd-put/enqueue-library.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include "enqueue.h"
1818
#include "elf_dlopen.h"
1919

20-
#ifndef NT_FDO_PACKAGING_METADATA
21-
# define NT_FDO_PACKAGING_METADATA 0x407c0c0a
20+
#ifndef NT_FDO_DLOPEN_METADATA
21+
# define NT_FDO_DLOPEN_METADATA 0x407c0c0a
2222
#endif
2323

2424
#ifndef ELF_NOTE_FDO
@@ -122,7 +122,7 @@ int enqueue_elf_dlopen(const char *filename, int fd)
122122

123123
off = 0;
124124
while ((next = gelf_getnote(data, off, &nhdr, &n_off, &d_off)) > 0) {
125-
if (nhdr.n_type == NT_FDO_PACKAGING_METADATA &&
125+
if (nhdr.n_type == NT_FDO_DLOPEN_METADATA &&
126126
nhdr.n_namesz == sizeof(ELF_NOTE_FDO) &&
127127
!strcmp(data->d_buf + n_off, ELF_NOTE_FDO)) {
128128
library[0] = '\0';

0 commit comments

Comments
 (0)