Displaying 20 results from an estimated 41 matches for "elf_shdr".
2011 Oct 13
0
[LLVMdev] llvm-objdump related patch
...::sectionContainsSymbol(DataRefImpl Sec,
DataRefImpl Symb,
bool &Result) const {
- // FIXME: Unimplemented.
+
Result = false;
+ const Elf_Sym *sym = getSymbol(Symb);
+ const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
+
+ if (getSection(sym->st_shndx) != sec) {
This version of getSection will not handle extended section indices
properly. Use the version that takes a const Elf_Sym*. This also fails
when there is no section table, which is not required f...
2011 Oct 12
2
[LLVMdev] llvm-objdump related patch
Michael,
I have rework the patch according to your suggestion. And I have
read binutil/objdump source code and found that it has a logic that if
there's no symtab, it will use dynsym, which is missing in llvm-objdump.
Songmao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-the-address-calculation-for-llvm-objdump.patch
Type: text/x-patch
2014 Feb 26
2
[LLVMdev] [lld] Relocation reading refactoring
...12 12:46:53 2013
> New Revision: 174990
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174990&view=rev
[...]
> ELFDefinedAtom<ELFT> *createDefinedAtomAndAssignRelocations(
> StringRef symbolName, StringRef sectionName, const Elf_Sym *symbol,
> const Elf_Shdr *section, ArrayRef<uint8_t> content) {
> @@ -380,6 +534,11 @@ private:
> (ri->r_offset < symbol->st_value + content.size())) {
> auto *ERef = new (_readerStorage)
> ELFReference<ELFT>(ri, ri->r_offset - symbol->st_value,...
2017 Oct 04
1
[PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure
...er->init_platform)
x86_hyper->init_platform();
}
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 62e7d70aadd5..34ec137e302a 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -213,8 +213,8 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL,
- *para = NULL, *orc = NULL, *orc_ip = NULL;
+ const Elf_Shdr *s, *text = NULL, *alt = NULL, *pv_alt = NULL,
+ *locks = NULL, *para = NULL, *orc = NULL, *orc_ip = NULL;
char *secstrings = (void...
2018 May 23
0
[PATCH v3 23/27] x86/modules: Adapt module loading for PIE support
...) &&
+ !find_got_kernel_entry(s, rela + i))
+ ret++;
+ break;
+ }
+ }
+ return ret;
+}
+
+/*
+ * Generate GOT entries for GOTPCREL relocations that do not exists in the
+ * kernel GOT. Based on arm64 module-plts implementation.
+ */
+int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
+ char *secstrings, struct module *mod)
+{
+ unsigned long gots = 0;
+ Elf_Shdr *symtab = NULL;
+ Elf64_Sym *syms = NULL;
+ char *strings, *name;
+ int i;
+
+ /*
+ * Find the empty .got section so we can expand it to store the PLT
+ * entries. Record the symtab address as well....
2007 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...ch/i386/kernel/module.c
--- working-2.6.17-rc4-function-call-abstraction/arch/i386/kernel/module.c 2006-05-16 10:50:48.000000000 +1000
+++ working-2.6.17-rc4-bench/arch/i386/kernel/module.c 2006-05-22 15:21:55.000000000 +1000
@@ -108,7 +108,8 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL;
+ const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL,
+ *para = NULL;
char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
for (s = sechdrs; s < sechdrs + hdr-...
2007 Apr 18
1
[PATCH] (with benchmarks) binary patching of paravirt_ops call sites
...ch/i386/kernel/module.c
--- working-2.6.17-rc4-function-call-abstraction/arch/i386/kernel/module.c 2006-05-16 10:50:48.000000000 +1000
+++ working-2.6.17-rc4-bench/arch/i386/kernel/module.c 2006-05-22 15:21:55.000000000 +1000
@@ -108,7 +108,8 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL;
+ const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL,
+ *para = NULL;
char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
for (s = sechdrs; s < sechdrs + hdr-...
2007 Jun 15
1
[PATCH RFC] add domain builder support for bzImage kernels
..., 0);
}
-static int xc_dom_load_elf_symtab(struct xc_dom_image *dom,
- struct elf_binary *elf, int load)
+int xc_dom_load_elf_symtab(struct xc_dom_image *dom,
+ struct elf_binary *elf, int load)
{
struct elf_binary syms;
const elf_shdr *shdr, *shdr2;
diff -r 3af164753238 tools/libxc/xc_dom_x86.c
--- a/tools/libxc/xc_dom_x86.c Thu Jun 14 08:15:19 2007 -0700
+++ b/tools/libxc/xc_dom_x86.c Thu Jun 14 08:43:44 2007 -0700
@@ -23,6 +23,7 @@
#include "xg_private.h"
#include "xc_dom.h"
#include "xenctrl.h"...
2007 Jun 15
1
[PATCH RFC] add domain builder support for bzImage kernels
..., 0);
}
-static int xc_dom_load_elf_symtab(struct xc_dom_image *dom,
- struct elf_binary *elf, int load)
+int xc_dom_load_elf_symtab(struct xc_dom_image *dom,
+ struct elf_binary *elf, int load)
{
struct elf_binary syms;
const elf_shdr *shdr, *shdr2;
diff -r 3af164753238 tools/libxc/xc_dom_x86.c
--- a/tools/libxc/xc_dom_x86.c Thu Jun 14 08:15:19 2007 -0700
+++ b/tools/libxc/xc_dom_x86.c Thu Jun 14 08:43:44 2007 -0700
@@ -23,6 +23,7 @@
#include "xg_private.h"
#include "xc_dom.h"
#include "xenctrl.h"...
2007 Jun 15
1
[PATCH RFC] add domain builder support for bzImage kernels
..., 0);
}
-static int xc_dom_load_elf_symtab(struct xc_dom_image *dom,
- struct elf_binary *elf, int load)
+int xc_dom_load_elf_symtab(struct xc_dom_image *dom,
+ struct elf_binary *elf, int load)
{
struct elf_binary syms;
const elf_shdr *shdr, *shdr2;
diff -r 3af164753238 tools/libxc/xc_dom_x86.c
--- a/tools/libxc/xc_dom_x86.c Thu Jun 14 08:15:19 2007 -0700
+++ b/tools/libxc/xc_dom_x86.c Thu Jun 14 08:43:44 2007 -0700
@@ -23,6 +23,7 @@
#include "xg_private.h"
#include "xc_dom.h"
#include "xenctrl.h"...
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael,
On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote:
> However, do we need to start with instrumentation? The original paper
> uses sampling with good results and current intel cpus can record every
> branch in a program.
>
> I would propose starting with just an lld patch that reads the call
> graph from a file. The format would be very similar to
2007 Apr 18
3
[PATCH 1/2] paravirt.h header
OK, this is the revised paravirt.h (Andi has seen this before), then the
second is the binary patching stuff. More things get added to the
paravirt struct in future patches, but this basic stuff hasn't changed
for some time.
====
This patch does the dumbest possible replacement of paravirtualized
instructions: calls through a "paravirt_ops" structure. Currently
these are function
2007 Apr 18
8
[PATCH 0/7] x86 paravirtualization infrastructure
The following patches introduce the core infrastructure needed to
paravirtualize the 32-bit x86 Linux kernel. This is done by moving
virtualization sensitive insn's or code paths to a function table,
paravirt_ops. This structure can be populated with hypervisor specific
calls or native stubs and currently support running on bare metal, VMI,
Xen, or Lhype. These patches apply to
2007 Apr 18
8
[PATCH 0/7] x86 paravirtualization infrastructure
The following patches introduce the core infrastructure needed to
paravirtualize the 32-bit x86 Linux kernel. This is done by moving
virtualization sensitive insn's or code paths to a function table,
paravirt_ops. This structure can be populated with hypervisor specific
calls or native stubs and currently support running on bare metal, VMI,
Xen, or Lhype. These patches apply to
2017 Oct 04
31
[PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality.
For example, instead of:
callq *0xffffffff81e3a400 (pv_irq_ops.save_fl)
vmlinux will now show:
pushfq
pop %rax
nop
nop
nop
nop
nop
which is what the runtime version of the code will show in most cases.
This idea was suggested by Andy Lutomirski.
The benefits are:
- For the most common runtime cases
2017 Oct 04
31
[PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality.
For example, instead of:
callq *0xffffffff81e3a400 (pv_irq_ops.save_fl)
vmlinux will now show:
pushfq
pop %rax
nop
nop
nop
nop
nop
which is what the runtime version of the code will show in most cases.
This idea was suggested by Andy Lutomirski.
The benefits are:
- For the most common runtime cases
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching
completely to alternative patching for the same functionality.
The basic idea is to add the capability to switch from indirect to
direct calls via a special alternative patching option.
This removes _some_ of the paravirt macro maze, but most of it needs
to stay due to the need of hiding the call instructions from the
compiler
2023 Jun 08
3
[RFC PATCH 0/3] x86/paravirt: Get rid of paravirt patching
This is a small series getting rid of paravirt patching by switching
completely to alternative patching for the same functionality.
The basic idea is to add the capability to switch from indirect to
direct calls via a special alternative patching option.
This removes _some_ of the paravirt macro maze, but most of it needs
to stay due to the need of hiding the call instructions from the
compiler
2008 Dec 12
5
[PATCH 0/5] ia64/pv_ops, xen: binary patch optimization TAKE 2
This patch set is intended for the next merge window. They are just
enhancements of the already merged patches or ia64 porting from x86
paravirt techniques and that their quality is enough for merge.
This patch set is for binary patch optimization for paravirt_ops.
The binary patch optimization is important on native case because
the paravirt_ops overhead can be reduced by converting indirect
2008 Dec 12
5
[PATCH 0/5] ia64/pv_ops, xen: binary patch optimization TAKE 2
This patch set is intended for the next merge window. They are just
enhancements of the already merged patches or ia64 porting from x86
paravirt techniques and that their quality is enough for merge.
This patch set is for binary patch optimization for paravirt_ops.
The binary patch optimization is important on native case because
the paravirt_ops overhead can be reduced by converting indirect