BPF List
 help / color / mirror / Atom feed
* [PATCH 0/1] bpf, docs: Update llvm_relocs.rst with typo fixes
@ 2023-04-28  2:30 Will Hawkins
  2023-04-28  2:30 ` [PATCH 1/1] " Will Hawkins
  2023-05-05 15:30 ` [PATCH 0/1] " patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Will Hawkins @ 2023-04-28  2:30 UTC (permalink / raw)
  To: bpf; +Cc: Will Hawkins, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko

Thank you all for donating your valuable time to maintaining such an
incredible piece of technology. 

I found a few typos that I thought I could help correct while I was
reading the LLVM relocation documentation. I hope that they are helpful
to a future newcomer. 

I tried to follow all the best practices for submitting patches and hope
that I am taking the right steps. Please let me know what changes need
to be made.

Thanks again for your work!
Will

Will Hawkins (1):
  bpf, docs: Update llvm_relocs.rst with typo fixes

 Documentation/bpf/llvm_reloc.rst | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] bpf, docs: Update llvm_relocs.rst with typo fixes
  2023-04-28  2:30 [PATCH 0/1] bpf, docs: Update llvm_relocs.rst with typo fixes Will Hawkins
@ 2023-04-28  2:30 ` Will Hawkins
  2023-04-28 14:28   ` Yonghong Song
  2023-05-05 15:30 ` [PATCH 0/1] " patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Will Hawkins @ 2023-04-28  2:30 UTC (permalink / raw)
  To: bpf
  Cc: Will Hawkins, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Will Hawkins

From: Will Hawkins <whh8b@obs.cr>

Correct a few typographical errors and fix some mistakes in examples.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
---
 Documentation/bpf/llvm_reloc.rst | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/Documentation/bpf/llvm_reloc.rst b/Documentation/bpf/llvm_reloc.rst
index ca8957d5b671..e4a777a6a3a2 100644
--- a/Documentation/bpf/llvm_reloc.rst
+++ b/Documentation/bpf/llvm_reloc.rst
@@ -48,7 +48,7 @@ the code with ``llvm-objdump -dr test.o``::
       14:       0f 10 00 00 00 00 00 00 r0 += r1
       15:       95 00 00 00 00 00 00 00 exit
 
-There are four relations in the above for four ``LD_imm64`` instructions.
+There are four relocations in the above for four ``LD_imm64`` instructions.
 The following ``llvm-readelf -r test.o`` shows the binary values of the four
 relocations::
 
@@ -79,14 +79,16 @@ The following is the symbol table with ``llvm-readelf -s test.o``::
 The 6th entry is global variable ``g1`` with value 0.
 
 Similarly, the second relocation is at ``.text`` offset ``0x18``, instruction 3,
-for global variable ``g2`` which has a symbol value 4, the offset
-from the start of ``.data`` section.
-
-The third and fourth relocations refers to static variables ``l1``
-and ``l2``. From ``.rel.text`` section above, it is not clear
-which symbols they really refers to as they both refers to
+has a type of ``R_BPF_64_64`` and refers to entry 7 in the symbol table.
+The second relocation resolves to global variable ``g2`` which has a symbol
+value 4. The symbol value represents the offset from the start of ``.data``
+section where the initial value of the global variable ``g2`` is stored.
+
+The third and fourth relocations refer to static variables ``l1``
+and ``l2``. From the ``.rel.text`` section above, it is not clear
+to which symbols they really refer as they both refer to
 symbol table entry 4, symbol ``sec``, which has ``STT_SECTION`` type
-and represents a section. So for static variable or function,
+and represents a section. So for a static variable or function,
 the section offset is written to the original insn
 buffer, which is called ``A`` (addend). Looking at
 above insn ``7`` and ``11``, they have section offset ``8`` and ``12``.
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] bpf, docs: Update llvm_relocs.rst with typo fixes
  2023-04-28  2:30 ` [PATCH 1/1] " Will Hawkins
@ 2023-04-28 14:28   ` Yonghong Song
  0 siblings, 0 replies; 4+ messages in thread
From: Yonghong Song @ 2023-04-28 14:28 UTC (permalink / raw)
  To: Will Hawkins, bpf
  Cc: Will Hawkins, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko



On 4/27/23 7:30 PM, Will Hawkins wrote:
> From: Will Hawkins <whh8b@obs.cr>
> 
> Correct a few typographical errors and fix some mistakes in examples.
> 
> Signed-off-by: Will Hawkins <hawkinsw@obs.cr>

Acked-by: Yonghong Song <yhs@fb.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1] bpf, docs: Update llvm_relocs.rst with typo fixes
  2023-04-28  2:30 [PATCH 0/1] bpf, docs: Update llvm_relocs.rst with typo fixes Will Hawkins
  2023-04-28  2:30 ` [PATCH 1/1] " Will Hawkins
@ 2023-05-05 15:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-05 15:30 UTC (permalink / raw)
  To: Will Hawkins; +Cc: bpf, ast, daniel, andrii

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Thu, 27 Apr 2023 22:30:14 -0400 you wrote:
> Thank you all for donating your valuable time to maintaining such an
> incredible piece of technology.
> 
> I found a few typos that I thought I could help correct while I was
> reading the LLVM relocation documentation. I hope that they are helpful
> to a future newcomer.
> 
> [...]

Here is the summary with links:
  - [1/1] bpf, docs: Update llvm_relocs.rst with typo fixes
    https://git.kernel.org/bpf/bpf-next/c/69535186297b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-05 15:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28  2:30 [PATCH 0/1] bpf, docs: Update llvm_relocs.rst with typo fixes Will Hawkins
2023-04-28  2:30 ` [PATCH 1/1] " Will Hawkins
2023-04-28 14:28   ` Yonghong Song
2023-05-05 15:30 ` [PATCH 0/1] " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox