• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/valgrind/valgrind-0003-Add-replacement-for-a.out.h.patch
Jérôme PouillerJérôme Pouiller committed bfbe4dd19e902 Jan 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From d560106f300dd2547c659511c8668d88a50eb577 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= <jezz@sysmic.org>
3
Date: Thu, 2 Jan 2014 16:00:49 +0100
4
Subject: [PATCH 3/3] Add replacement for <a.out.h>
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
​
9
Valgrind includes <a.out.h> to get the definition of 'struct
10
nlist'. However, while glibc directly defines 'struct nlist' in
11
<a.out.h>, uClibc relies on it being defined by kernel headers (i.e
12
<a.out.h> simply includes <linux/a.out.h>). This works for most
13
architectures, but not for PowerPC, on which the a.out binary format
14
has never been supported, and therefore the <linux/a.out.h> kernel
15
header does not exist.
16
​
17
One solution would have been to use the <nlist.h> header, but this one
18
is only available in glibc, and it also has a slightly different
19
definition than the one in <a.out.h>. So, for the time being, the
20
easiest solution is to just replace the #include <a.out.h> in Valgrind
21
code by a copy/paste of the 'struct nlist' definition.
22
​
23
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
24
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
25
---
26
 coregrind/m_debuginfo/readstabs.c | 16 +++++++++++++++-
27
 1 file changed, 15 insertions(+), 1 deletion(-)
28
​
29
diff --git a/coregrind/m_debuginfo/readstabs.c b/coregrind/m_debuginfo/readstabs.c
30
index 70ad319..47f5bc7 100644
31
--- a/coregrind/m_debuginfo/readstabs.c
32
+++ b/coregrind/m_debuginfo/readstabs.c
33
@@ -54,7 +54,21 @@
34
 
35
 /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
36
 #if defined(VGO_linux)
37
-#  include <a.out.h> /* stabs defns */
38
+/* Copied from a.out.h, because it is otherwise not available on
39
+   PowerPC/uClibc */
40
+struct nlist
41
+{
42
+  union
43
+    {
44
+      char *n_name;
45
+      struct nlist *n_next;
46
+      long n_strx;
47
+    } n_un;
48
+  unsigned char n_type;
49
+  char n_other;
50
+  short n_desc;
51
+  unsigned long n_value;
52
+};
53
 #elif defined(VGO_darwin)
54
 #  include <mach-o/nlist.h>
55
 #  define n_other n_sect
56
-- 
57
1.8.3.2
58
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.