这是indexloc提供的服务,不要输入任何密码
Skip to content

Exception: __libc_start_main in translated hello world using glibc #391

@hushenwei2000

Description

@hushenwei2000

I followed the tutorial for installation in https://rev.ng/blog/open-sourcing-renvg-decompiler-ui-closed-beta. After installation, in this site has an example that says:

OK, let's now decompile a simple program. Consider example.c:

int main(int argc, char *argv[]) {
  return argc * 3;
}

You can compile and decompile it:

$ gcc example.c -o example -O2
$ revng artifact \
        --analyze \
        --progress \
        decompile-to-single-file \
        example \
        | revng ptml --color \
        | grep -A2 -B1 '[^_]main\b' \
        > decompiled.c

You should obtain:

_ABI(SystemV_x86_64)
generic64_t main(generic64_t _argument0) {
  return _argument0 * 3 & 0xFFFFFFFF;
}

I follow this, and there is no error, but my decompiled.c is:

_ABI(SystemV_x86_64)
�[38;5;85mgeneric64_t�[0m �[91mmain�[0m(�[38;5;85mgeneric64_t�[0m �[38;5;214m_argument0�[0m) {
  �[38;5;33mreturn�[0m �[38;5;214m_argument0�[0m �[38;5;33m*�[0m �[38;5;87m3�[0m �[38;5;33m&�[0m �[38;5;87m0xFFFFFFFF�[0m;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions