Skip to content

multiple definition of `global_hacks' and "opts" #21

@vans88

Description

@vans88

The ploblem phenomenon

root@debian-pc:/home/vans-pc/ecfs# make
gcc -fPIC -pie -D_GNU_SOURCE -m64 main/ecfs.c bin/prod/64/ecfs.a libecfs/bin/prod/64/libecfsreader64.a -o bin/prod/64/ecfs -ldwarf -lelf -lm
/usr/bin/ld: bin/prod/64/ecfs.a(personality.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(personality.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(core_notes.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(core_notes.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(util.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(util.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(dlopen.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(dlopen.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(core_text.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(core_text.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(core_headers.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(core_headers.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(symresolve.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(symresolve.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(ptrace.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(ptrace.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(core2ecfs.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(core2ecfs.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(proc.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(proc.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(core_accessors.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(core_accessors.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(so_resolve.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(so_resolve.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(list.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(list.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
/usr/bin/ld: bin/prod/64/ecfs.a(eh_frame.o):(.bss+0x0): multiple definition of global_hacks'; /tmp/ccRPWecy.o:(.bss+0x0): first defined here /usr/bin/ld: bin/prod/64/ecfs.a(eh_frame.o):(.bss+0xa0): multiple definition of opts'; /tmp/ccRPWecy.o:(.bss+0xa0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:61:bin/prod/64/ecfs] Error:

My OS info

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
gcc version 10.2.1 20210110 (Debian 10.2.1-6)
root@debian-pc:/home/vans-pc/ecfs# dpkg -l | grep libelf
ii libelf-dev:amd64 0.187-1bpo11+1 amd64 libelf1 development libraries and header files
ii libelf1:amd64 0.187-1
bpo11+1 amd64 library to read and write ELF files
root@debian-pc:/home/vans-pc/ecfs# dpkg -l | grep dwarf
ii libdwarf-dev:amd64 20201201-1 amd64 library to consume and produce DWARF debug information
ii libdwarf1:amd64 20201201-1 amd64 library to consume and produce DWARF debug information (runtime)

ecfs repo: https://github.com/elfmaster/ecfs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions