S
S
sergeimvc2020-02-28 18:01:17
linux
sergeimvc, 2020-02-28 18:01:17

How to rebuild binaries on linux?

Hi all.
For example, in Linux, there is a binary located along the path /bin/login or any other (gedit for example).
OS: debian
Questions:
- Where can I find the source code for this binary? (I assume this is C or C++ code)
- How do I recompile it?

The bottom line is that I need to make some changes to the binary files, and specifically, change the path.
I know for sure that it is listed there, because when I open the binary using Notepad ++ or in any other text editor, then among the "cracks" I see quite readable text there, in particular the path.
Of course, simply editing the binary will not help in any way, so I'm looking for a way to compile it again.

Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ronald McDonald, 2020-02-28
@Zoominger

Hack the sources repository (where the sources for the packages are) and say: apt-get install gedit-sourcesand go ahead.

V
Vadim Priluzkiy, 2020-02-28
@Oxyd

1. Go to Google.
2. We say the spell name of the program sources For example gedit sources. The first link is a link to the github .
3. Read README.MD and act as described there.

V
Vladimir, 2020-02-28
@MechanID

Other rpm packages have such a thing as src rpm which contains sources, spec file, and other little things like configs, mana and unit files. This will allow you to rebuild the package you need with a minimum of effort.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question