Skip to content

Commit 7a89602

Browse files
author
Al Viro
committed
kill elf_fpxregs_t
all uses are conditional upon ELF_CORE_COPY_XFPREGS, which has not been defined on any architecture since 2010 Signed-off-by: Al Viro <[email protected]>
1 parent 16aead8 commit 7a89602

File tree

6 files changed

+0
-71
lines changed

6 files changed

+0
-71
lines changed

arch/ia64/include/asm/elf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ extern void ia64_init_addr_space (void);
179179
#define ELF_AR_SSD_OFFSET (56 * sizeof(elf_greg_t))
180180
#define ELF_AR_END_OFFSET (57 * sizeof(elf_greg_t))
181181

182-
typedef unsigned long elf_fpxregset_t;
183-
184182
typedef unsigned long elf_greg_t;
185183
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
186184

arch/powerpc/include/asm/elf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs,
5353
}
5454
#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
5555

56-
typedef elf_vrregset_t elf_fpxregset_t;
57-
5856
/* ELF_HWCAP yields a mask that user programs can use to figure out what
5957
instruction set this cpu supports. This could be done in userspace,
6058
but it's not easy, and we've already done it here. */

arch/x86/include/asm/elf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ typedef struct user_i387_struct elf_fpregset_t;
2121

2222
#ifdef __i386__
2323

24-
typedef struct user_fxsr_struct elf_fpxregset_t;
25-
2624
#define R_386_NONE 0
2725
#define R_386_32 1
2826
#define R_386_PC32 2

fs/binfmt_elf.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,9 +2038,6 @@ struct elf_thread_status
20382038
struct elf_prstatus prstatus; /* NT_PRSTATUS */
20392039
elf_fpregset_t fpu; /* NT_PRFPREG */
20402040
struct task_struct *thread;
2041-
#ifdef ELF_CORE_COPY_XFPREGS
2042-
elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */
2043-
#endif
20442041
struct memelfnote notes[3];
20452042
int num_notes;
20462043
};
@@ -2071,15 +2068,6 @@ static int elf_dump_thread_status(long signr, struct elf_thread_status *t)
20712068
t->num_notes++;
20722069
sz += notesize(&t->notes[1]);
20732070
}
2074-
2075-
#ifdef ELF_CORE_COPY_XFPREGS
2076-
if (elf_core_copy_task_xfpregs(p, &t->xfpu)) {
2077-
fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE,
2078-
sizeof(t->xfpu), &t->xfpu);
2079-
t->num_notes++;
2080-
sz += notesize(&t->notes[2]);
2081-
}
2082-
#endif
20832071
return sz;
20842072
}
20852073

@@ -2090,9 +2078,6 @@ struct elf_note_info {
20902078
struct elf_prpsinfo *psinfo; /* NT_PRPSINFO */
20912079
struct list_head thread_list;
20922080
elf_fpregset_t *fpu;
2093-
#ifdef ELF_CORE_COPY_XFPREGS
2094-
elf_fpxregset_t *xfpu;
2095-
#endif
20962081
user_siginfo_t csigdata;
20972082
int thread_status_size;
20982083
int numnote;
@@ -2116,11 +2101,6 @@ static int elf_note_info_init(struct elf_note_info *info)
21162101
info->fpu = kmalloc(sizeof(*info->fpu), GFP_KERNEL);
21172102
if (!info->fpu)
21182103
return 0;
2119-
#ifdef ELF_CORE_COPY_XFPREGS
2120-
info->xfpu = kmalloc(sizeof(*info->xfpu), GFP_KERNEL);
2121-
if (!info->xfpu)
2122-
return 0;
2123-
#endif
21242104
return 1;
21252105
}
21262106

@@ -2184,13 +2164,6 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
21842164
if (info->prstatus->pr_fpvalid)
21852165
fill_note(info->notes + info->numnote++,
21862166
"CORE", NT_PRFPREG, sizeof(*info->fpu), info->fpu);
2187-
#ifdef ELF_CORE_COPY_XFPREGS
2188-
if (elf_core_copy_task_xfpregs(current, info->xfpu))
2189-
fill_note(info->notes + info->numnote++,
2190-
"LINUX", ELF_CORE_XFPREG_TYPE,
2191-
sizeof(*info->xfpu), info->xfpu);
2192-
#endif
2193-
21942167
return 1;
21952168
}
21962169

@@ -2243,9 +2216,6 @@ static void free_note_info(struct elf_note_info *info)
22432216
kfree(info->psinfo);
22442217
kfree(info->notes);
22452218
kfree(info->fpu);
2246-
#ifdef ELF_CORE_COPY_XFPREGS
2247-
kfree(info->xfpu);
2248-
#endif
22492219
}
22502220

22512221
#endif

fs/binfmt_elf_fdpic.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,9 +1457,6 @@ struct elf_thread_status
14571457
struct elf_prstatus_fdpic prstatus; /* NT_PRSTATUS */
14581458
elf_fpregset_t fpu; /* NT_PRFPREG */
14591459
struct task_struct *thread;
1460-
#ifdef ELF_CORE_COPY_XFPREGS
1461-
elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */
1462-
#endif
14631460
struct memelfnote notes[3];
14641461
int num_notes;
14651462
};
@@ -1491,15 +1488,6 @@ static int elf_dump_thread_status(long signr, struct elf_thread_status *t)
14911488
t->num_notes++;
14921489
sz += notesize(&t->notes[1]);
14931490
}
1494-
1495-
#ifdef ELF_CORE_COPY_XFPREGS
1496-
if (elf_core_copy_task_xfpregs(p, &t->xfpu)) {
1497-
fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE,
1498-
sizeof(t->xfpu), &t->xfpu);
1499-
t->num_notes++;
1500-
sz += notesize(&t->notes[2]);
1501-
}
1502-
#endif
15031491
return sz;
15041492
}
15051493

@@ -1593,9 +1581,6 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
15931581
LIST_HEAD(thread_list);
15941582
struct list_head *t;
15951583
elf_fpregset_t *fpu = NULL;
1596-
#ifdef ELF_CORE_COPY_XFPREGS
1597-
elf_fpxregset_t *xfpu = NULL;
1598-
#endif
15991584
int thread_status_size = 0;
16001585
elf_addr_t *auxv;
16011586
struct elf_phdr *phdr4note = NULL;
@@ -1634,11 +1619,6 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
16341619
fpu = kmalloc(sizeof(*fpu), GFP_KERNEL);
16351620
if (!fpu)
16361621
goto end_coredump;
1637-
#ifdef ELF_CORE_COPY_XFPREGS
1638-
xfpu = kmalloc(sizeof(*xfpu), GFP_KERNEL);
1639-
if (!xfpu)
1640-
goto end_coredump;
1641-
#endif
16421622

16431623
for (ct = current->mm->core_state->dumper.next;
16441624
ct; ct = ct->next) {
@@ -1703,11 +1683,6 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
17031683
elf_core_copy_task_fpregs(current, cprm->regs, fpu)))
17041684
fill_note(notes + numnote++,
17051685
"CORE", NT_PRFPREG, sizeof(*fpu), fpu);
1706-
#ifdef ELF_CORE_COPY_XFPREGS
1707-
if (elf_core_copy_task_xfpregs(current, xfpu))
1708-
fill_note(notes + numnote++,
1709-
"LINUX", ELF_CORE_XFPREG_TYPE, sizeof(*xfpu), xfpu);
1710-
#endif
17111686

17121687
offset += sizeof(*elf); /* Elf header */
17131688
offset += segs * sizeof(struct elf_phdr); /* Program headers */
@@ -1828,9 +1803,6 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
18281803
kfree(notes);
18291804
kfree(fpu);
18301805
kfree(shdr4extnum);
1831-
#ifdef ELF_CORE_COPY_XFPREGS
1832-
kfree(xfpu);
1833-
#endif
18341806
return has_dumped;
18351807
#undef NUM_NOTES
18361808
}

include/linux/elfcore.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_reg
104104
#endif
105105
}
106106

107-
#ifdef ELF_CORE_COPY_XFPREGS
108-
static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)
109-
{
110-
return ELF_CORE_COPY_XFPREGS(t, xfpu);
111-
}
112-
#endif
113-
114107
/*
115108
* These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
116109
* extra segments containing the gate DSO contents. Dumping its

0 commit comments

Comments
 (0)