Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 650
b: refs/heads/master
c: 1b29f9d
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed May 1, 2005
1 parent 11a7569 commit c80bd1d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 085e6fc96bcf239cab8adc600aab2452d75590b1
refs/heads/master: 1b29f9d13e3cf0fe86bf7f82a3399c9e3caf58e5
2 changes: 1 addition & 1 deletion trunk/arch/ppc64/kernel/vdso32/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# List of files in the vdso, has to be asm only for now

obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o
obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o

# Build rules

Expand Down
25 changes: 25 additions & 0 deletions trunk/arch/ppc64/kernel/vdso32/note.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
* Here we can supply some information useful to userland.
*/

#include <linux/uts.h>
#include <linux/version.h>

#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \
.section name, flags; \
.balign 4; \
.long 1f - 0f; /* name length */ \
.long 3f - 2f; /* data length */ \
.long type; /* note type */ \
0: .asciz vendor; /* vendor name */ \
1: .balign 4; \
2:

#define ASM_ELF_NOTE_END \
3: .balign 4; /* pad out section */ \
.previous

ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0)
.long LINUX_VERSION_CODE
ASM_ELF_NOTE_END
3 changes: 3 additions & 0 deletions trunk/arch/ppc64/kernel/vdso32/vdso32.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ SECTIONS
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }

.note : { *(.note.*) } :text :note

. = ALIGN (16);
.text :
{
Expand Down Expand Up @@ -87,6 +89,7 @@ SECTIONS
PHDRS
{
text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
note PT_NOTE FLAGS(4); /* PF_R */
dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ppc64/kernel/vdso64/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# List of files in the vdso, has to be asm only for now

obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o
obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o

# Build rules

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ppc64/kernel/vdso64/note.S
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "../vdso32/note.S"
5 changes: 4 additions & 1 deletion trunk/arch/ppc64/kernel/vdso64/vdso64.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ SECTIONS
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }

.note : { *(.note.*) } :text :note

. = ALIGN (16);
.text :
{
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.sfpr .glink)
}
} :text
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
Expand Down Expand Up @@ -88,6 +90,7 @@ SECTIONS
PHDRS
{
text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
note PT_NOTE FLAGS(4); /* PF_R */
dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
}
Expand Down

0 comments on commit c80bd1d

Please sign in to comment.