Displaying 15 results from an estimated 15 matches for "stb_local".
Did you mean:
smc_local
2012 Oct 15
2
[LLVMdev] LLD AbsoluteAtoms
...his work.
> Tell me more about the semantics of STT_FILE. The goal is not just to pass through ELF-isms. The goal is to define a really good model and translate each object format into that model. A web search for STT_FILE gives:
>
In this case for it may be an ELF'ism, when
st_info == STB_LOCAL | STT_FILE
st_shndx == SHN_ABS
Then st_value will probably be zero and this symbol's name should match
the name of the originating source file.
Currently there is only one qualifying characteristic a symbol must have
in order to be converted into an absolute atom, st_shndx == SHN_ABS.
The p...
2012 Oct 16
2
[LLVMdev] LLD AbsoluteAtoms
...ics of STT_FILE. The goal is not just to
> pass through ELF-isms. The goal is to define a really good model and
> translate each object format into that model. A web search for STT_FILE
> gives:
> >>
> > In this case for it may be an ELF'ism, when
> > st_info == STB_LOCAL | STT_FILE
> > st_shndx == SHN_ABS
> >
> > Then st_value will probably be zero and this symbol's name should match
> > the name of the originating source file.
> The lld::File class has a method translationUnitSource() that (if
> available) returns the path to the...
2012 Oct 15
0
[LLVMdev] LLD AbsoluteAtoms
...Tell me more about the semantics of STT_FILE. The goal is not just to pass through ELF-isms. The goal is to define a really good model and translate each object format into that model. A web search for STT_FILE gives:
>>
> In this case for it may be an ELF'ism, when
> st_info == STB_LOCAL | STT_FILE
> st_shndx == SHN_ABS
>
> Then st_value will probably be zero and this symbol's name should match
> the name of the originating source file.
The lld::File class has a method translationUnitSource() that (if available) returns the path to the source file that created this...
2012 Oct 15
0
[LLVMdev] LLD AbsoluteAtoms
...ust to pass through ELF-isms. The goal is to define a really good model and translate each object format into that model. A web search for STT_FILE gives:
> STT_FILE
> Conventionally, the symbol's name gives the name of the source file associated with the object file. A file symbol has STB_LOCAL binding and its section index is SHN_ABS. This symbol, if present, precedes the other STB_LOCAL symbols for the file. Symbol index 1 of the SHT_SYMTAB is an STT_FILE symbol representing the file itself. Conventionally, this symbols is followed by the files STT_SECTION symbols, and any global symbol...
2012 Oct 16
0
[LLVMdev] LLD AbsoluteAtoms
...bout the semantics of STT_FILE. The goal is not just to pass through ELF-isms. The goal is to define a really good model and translate each object format into that model. A web search for STT_FILE gives:
> >>
> > In this case for it may be an ELF'ism, when
> > st_info == STB_LOCAL | STT_FILE
> > st_shndx == SHN_ABS
> >
> > Then st_value will probably be zero and this symbol's name should match
> > the name of the originating source file.
> The lld::File class has a method translationUnitSource() that (if available) returns the path to the sourc...
2012 Oct 15
3
[LLVMdev] LLD AbsoluteAtoms
I think that absolute atoms will need something similar to,
"contentType" added.
SHN_ABS symbols can have different types, STT_OBJECT, STT_FILE and maybe
others. In order for the writer to tell it must have a way to reach
back and ask the atom what type of symbols caused it to be created. To
that end I added a contentType method to AbsoluteAtom and sprinkled
changes around to
2014 Feb 05
2
[LLVMdev] [lld] Allow atoms with empty name in the RefNameBuilder::buildDuplicateNameMap()
...references to absolute symbols with no name. The only real case when I
see such symbol is a local absolute symbol with "STT_FILE" type. The
name of "STT_FILE" symbol is a name of the source file associated with
the object file and the "STT_FILE" symbol precedes the other STB_LOCAL
symbols from this object file. So it is just a "marker" symbol.
If think it's enough to do not call buildDuplicateNameMap() if the
absolute atom has no name. I suggest to fix that in the code and write
a test covers this case.
--
Simon
On Wed, Feb 5, 2014 at 5:06 AM, Nick Kledzik...
2012 Oct 16
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Hi Greg,
I'm afraid I've not looked into the infrastructure Jim put into place,
so I've not really been able to answer the "how should I do it"
questions, but hopefully I can comment on the ABI.
> And probably questions for Tim, are these "section-relative" mapping
> symbols, as defined in 4.6.5.1 of the ELF for ARM document?
Yes, they are.
> And what
2005 Jan 06
0
[PATCH] ELF headers
...BI_NONE 0
#define ELFOSABI_LINUX 3
+/* How to extract and insert information held in the st_info field. */
+
+#define ST_BIND(val) (((unsigned char) (val)) >> 4)
+#define ST_TYPE(val) ((val) & 0xf)
+#define ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
+
+#define STB_LOCAL 0 /* local symbol */
+#define STB_GLOBAL 1 /* global symbol */
+#define STB_WEAK 2 /* weak symbol */
+#define STB_NUM 3 /* number of defined types. */
+#define STB_LOOS 10 /* start of OS-specific */
+#define STB_HIOS 12 /* end of OS-specific */
+#define STB_LOPROC 13 /* start of processor-specifi...
2012 Oct 17
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
...;
+ StringRef UniqueName = Name.str() + "." + itostr(MappingSymbolCounter++);
+ MCSymbol *Symbol = getContext().GetOrCreateSymbol(UniqueName);
+
+ MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
+ MCELF::SetType(SD, ELF::STT_NOTYPE);
+ MCELF::SetBinding(SD, ELF::STB_LOCAL);
+ SD.setExternal(false);
+ Symbol->setSection(*getCurrentSection());
+
+ const MCExpr *Value = MCSymbolRefExpr::Create(Start, getContext());
+ Symbol->setVariableValue(Value);
+}
+
+void MCELFStreamer::EmitDataRegion(MCDataRegionType Kind) {
+ switch (Kind) {
+ case MCDR_DataR...
2007 Dec 10
1
[git patch] m-i-t support, ipconfig fix
...ys/elfcommon.h b/usr/include/sys/elfcommon.h
index 0d81db5..ad5e459 100644
--- a/usr/include/sys/elfcommon.h
+++ b/usr/include/sys/elfcommon.h
@@ -184,4 +184,14 @@
#define ELFOSABI_NONE 0
#define ELFOSABI_LINUX 3
+/* Legal values for ST_BIND subfield of st_info (symbol binding). */
+#define STB_LOCAL 0 /* Local symbol */
+#define STB_GLOBAL 1 /* Global symbol */
+#define STB_WEAK 2 /* Weak symbol */
+#define STB_NUM 3 /* Number of defined types. */
+#define STB_LOOS 10 /* Start of OS-specific */
+#define STB_HIOS 12 /* End of OS-specific */
+#define STB_LOPROC 13 /* Start of processor-...
2014 Feb 04
3
[LLVMdev] [lld] Allow atoms with empty name in the RefNameBuilder::buildDuplicateNameMap()
Hi,
Method RefNameBuilder::buildDuplicateNameMap() has an assert which
blocks atoms with empty name. In general it looks reasonable but some
toolchains (for example Sourcery CodeBench in both MIPS and ARM
editions) can generate an object file contains absolute STT_FILE
symbols with empty name. Moreover crt1.o object file from this
toolchain has such symbol. I do not know is it a feature or bug
2012 Oct 16
2
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Attached is an example of how to reproduce the issue. It uses a C
file that happens to has a bunch of switch statements which are
encoded as jump tables, giving us data-in-code. Usage:
To build object files with clang via the -integrated-as versus via GCC:
$ export NDK_DIR=<my_ndk_dir>
$ export LLVM_DIR=<my_llvm_bin_dir>
$ make
To test that the generated objects contain the same
2012 Oct 16
5
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Getting closer... When emitting symbols, how do I set the symbol's value
to the address of the current instruction? Do I need to emit a label in
the current section and another that uses the former to point to the
latter? If possible, a code sample would be very helpful.
And probably questions for Tim, are these "section-relative" mapping
symbols, as defined in 4.6.5.1 of the
2007 Sep 22
3
[git patch] module-init-tools fixes
...ys/elfcommon.h b/usr/include/sys/elfcommon.h
index 0d81db5..ad5e459 100644
--- a/usr/include/sys/elfcommon.h
+++ b/usr/include/sys/elfcommon.h
@@ -184,4 +184,14 @@
#define ELFOSABI_NONE 0
#define ELFOSABI_LINUX 3
+/* Legal values for ST_BIND subfield of st_info (symbol binding). */
+#define STB_LOCAL 0 /* Local symbol */
+#define STB_GLOBAL 1 /* Global symbol */
+#define STB_WEAK 2 /* Weak symbol */
+#define STB_NUM 3 /* Number of defined types. */
+#define STB_LOOS 10 /* Start of OS-specific */
+#define STB_HIOS 12 /* End of OS-specific */
+#define STB_LOPROC 13 /* Start of processor-...