Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

objcopy: add page #12754

Closed
wants to merge 5 commits into from
Closed

objcopy: add page #12754

wants to merge 5 commits into from

Conversation

pranav10780
Copy link
Contributor

  • The page(s) are in the correct platform directories: common, linux, osx, windows, sunos, android, etc.
  • The page(s) have at most 8 examples.
  • The page description(s) have links to documentation or a homepage.
  • The page(s) follow the content guidelines.
  • The PR title conforms to the recommended templates.
  • GNU objcopy (GNU Binutils for Ubuntu) 2.38

@pranav10780 pranav10780 requested a review from cyqsimon as a code owner May 7, 2024 15:01
@github-actions github-actions bot added the new command Issues requesting creation of a new page. label May 7, 2024
@pranav10780
Copy link
Contributor Author

sorry for taking 4 commits, i was unable to test it locally

@vitorhcl
Copy link
Member

vitorhcl commented May 7, 2024

sorry for taking 4 commits, i was unable to test it locally

No problem, it's absolutely normal to edit an already added page, the additional commits won't clutter the repository commit tree because they are squashed in a single commit.

For the next times, please follow the recommended templates for commit messages (the same as the PR template messages).

As for your case (modification of a single page), basically we have two recommended templates:

{{command_name}}: update page
(replacing "{{command_name}}" with its actual name)

Or:

{{command_name}}: {{change summary}}
(also replacing "{{change_summary}}" with a very short (if you can't keep it short, 50 chars recommended, 70 at max) of the changes done in the commit)

But no need to apologize! It's your first contribution after all, and I really appreciate your initiative to write this page and open a PR :)

Copy link
Member

@vitorhcl vitorhcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your page is very good, it contains concise and interesting examples.

LGTM after we address some minor issues I raised.

@@ -0,0 +1,24 @@
# objcopy

> The GNU objcopy utility copies the contents of an object file to another.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> The GNU objcopy utility copies the contents of an object file to another.
> Copy the contents of an object file to another.

The style guide recommends concise (without any sort of "the GNU foobar command, that is available for Windows, macOS and Linux..." text) page descriptions that directly answers what you can do (imperative mood) with the command.


- Copy data to another file:

`objcopy {{/your/path/to/file/src}} {{/your/path/to/file/destination}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`objcopy {{/your/path/to/file/src}} {{/your/path/to/file/destination}}`
`objcopy {{path/to/source_file}} {{path/to/target_file}}`

The style guide recommends:

  • Starting placeholders for absolute path arguments with "/" and not starting with "/" for relative path arguments
  • File placeholders in the form "{{path/to/file}}", where file can be relaced with a more descriptive name


- Translate object files from one format to another:

`objcopy --input-target={{inputformat}} --output-target={{output_format}} {{/path/to/your/src}} {{path/to/your/destination}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`objcopy --input-target={{inputformat}} --output-target={{output_format}} {{/path/to/your/src}} {{path/to/your/destination}}`
`objcopy --input-target={{inputformat}} --output-target={{output_format}} {{path/to/source_file}} {{path/to/destination_file}}`

See #12754 (comment).


- Strip all symbol information from file:

`objcopy --strip-all {{/path/to/your/src}} {{path/to/your/destination}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`objcopy --strip-all {{/path/to/your/src}} {{path/to/your/destination}}`
`objcopy --strip-all {{path/to/source_file}} {{path/to/destination_file}}`

See #12754 (comment).


- Strip debugging information from file:

`objcopy --strip-debug {{/path/to/your/src}} {{path/to/your/destination}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`objcopy --strip-debug {{/path/to/your/src}} {{path/to/your/destination}}`
`objcopy --strip-debug {{path/to/source_file}} {{path/to/destination_file}}`

See #12754 (comment).


- Copy a specific section from the source to destination:

`objcopy --only-section={{section}} {{/path/to/your/src}} {{path/to/your/destination}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`objcopy --only-section={{section}} {{/path/to/your/src}} {{path/to/your/destination}}`
`objcopy --only-section={{section}} {{/path/to/source_file}} {{path/to/destination_file}}`

See #12754 (comment).


`objcopy --input-target={{inputformat}} --output-target={{output_format}} {{/path/to/your/src}} {{path/to/your/destination}}`

- Strip all symbol information from file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Strip all symbol information from file:
- Strip all symbol information from a specific file:

> The GNU objcopy utility copies the contents of an object file to another.
> More information: <https://manned.org/objcopy>.

- Copy data to another file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Copy data to another file:
- Copy all data from a specific file to another one:


`objcopy --strip-debug {{/path/to/your/src}} {{path/to/your/destination}}`

- Copy a specific section from the source to destination:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Copy a specific section from the source to destination:
- Copy a specific section of the source file to the destination file:

@pranav10780 pranav10780 closed this May 8, 2024
@tldr-bot
Copy link

tldr-bot commented May 8, 2024

The build for this PR failed with the following error(s):

pages/linux/automake.md:
Error: Parse error on line 1:

^
Expecting 'TEXT', 'HASH', got '1'

Please fix the error(s) and push again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Issues requesting creation of a new page.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants