Comments (17)
A few questions:
- Do you have the same issue with the program not using openmp?
- I would not be surprised if two sections have the same base address if one of them has a size of 0. However in your example
.tbss
has a size of 0x4 so I suspect something is wrong in the alignment tool, you should not have to manually align anything. I guess this is the output of readelf called on the final, aligned binary right? - Can you paste here the actual error you get from pyalign? As well as the sources of the program you use to get this error (i.e. a way for me to reproduce the issue)
from popcorn-compiler.
- Yes
- I have only WARNING at the alignement stage:
WARNING: symbol does not have the same name as the containing section
WARNING: Symbol: .data.rel.ro @0x43ffc0, size: 0x10
WARNING: Section: .tbss @0x43ffc0, size: 0x4
It actually fails later at the linking stage: ld.gold
- A simple program to reproduce the warning is:
__thread volatile int x;
int main()
{
return x+123;
}
from popcorn-compiler.
Also, the error produced by the ld script is ( when compiling a program with the openmp library):
/usr/local/popcorn/bin/ld.gold: internal error in relocate_tls, at ../../gold/aarch64.cc:7433
../common.mk:172: recipe for target 'BT_aarch64' failed
from popcorn-compiler.
While trying to reproduce the issue, I see the warnings, however the linking process succeeds and the binaries seem to execute fine (I only tested the x86 one on my machine). Can you try with the latest commit on the master branch?
from popcorn-compiler.
Pierre, the test program produces only the warning without the "LD failing". You need to use the Openmp library ("libopenpop") to see the LD failing.
from popcorn-compiler.
This one line patch solves the problem. Still require some testing. So please test it, if possible, and let me know.
diff --git a/tool/alignment/pyalign/AbstractArchitecture.py b/tool/alignment/pyalign/AbstractArchitecture.py
index f3f3fbb..3baca2c 100644
--- a/tool/alignment/pyalign/AbstractArchitecture.py
+++ b/tool/alignment/pyalign/AbstractArchitecture.py
@@ -105,7 +105,7 @@ class AbstractArchitecture():
sectionAddr = section.getAddress()
sectionSize = section.getSize()
sectionName = section.getName()
- if (addr >= sectionAddr) and (addr < (sectionAddr + sectionSize)):
+ if symbol.getName().startswith(sectionName):
res = sectionName
if not symbol.getName().startswith(sectionName):
# Sanity check if the names fit. is it possible to have a symbol
from popcorn-compiler.
I can see how this silences the warning but this might skip some symbols to align. In addition to solving the warming, does this also solves the linking error you get with the omp library?
from popcorn-compiler.
Yes, the patch also solve the ld error.
from popcorn-compiler.
Ok cool, in that case a good way for you to test it is to run make check
on a maximum of applications, it will list the unaligned symbols
from popcorn-compiler.
Thanks for the make check tip.
Should we close the issue?
from popcorn-compiler.
Let's make sure that symbols are well aligned first, what is the output of make check
on multi-threaded (as well as single threaded) applications?
from popcorn-compiler.
I have tested it on blackscholes, NPB-SER and most NPB-OMP (I have another bug in some benchmarks: relocation overflow)
from popcorn-compiler.
nice! no unaligned symbol reported by make check
for any benchmark?
from popcorn-compiler.
Nop. everything went fine.
But before merging I would like for someone else to test, if possible.
from popcorn-compiler.
Great! I do not have complex programs to test right now (I have a few test cases but the are still in the ppc branch so I'll have to merge that later), so I think you are the person with the most advanced test cases!
Go on and commit your modification, then you can close the issue!
from popcorn-compiler.
Any simple program that you have will be good. The goal is to do some regression testing: hopping that I did not break any previously working program. Maybe Anthony can help with this, since he has his hands in this currently, If he can hear me? (I will ping him by email if not)
from popcorn-compiler.
All right, I think having a few test programs is easily doable and it will help for the alignment tool. Let me take care of that when I have more time during the break (I already have a test infrastructure somewhere on the ppc branch). I'm closing the issue and creating a new one for the alignment tool test cases.
from popcorn-compiler.
Related Issues (20)
- Segmentation fault during homogeneous execution on aarch64 HOT 2
- pyalign script bugs HOT 2
- Failed assertion in CodeGen/UnwindInfo.cpp HOT 2
- Soft floating-point emulation routines leaking into aarch64 HOT 9
- Unable to build bodytrack with clang HOT 1
- Unhandled level 2 translation fault HOT 1
- Segfault when compiling bzlib.c (bzip2 SPEC-2006) HOT 1
- Compilation fails with backend ran out of registers HOT 1
- number of records for stackmap ... doesn't match HOT 1
- Argv argument table corruption HOT 2
- Cannot Build libopenpop HOT 2
- libelf: different code paths on aarch64 compared to x86-64 HOT 1
- GCC constructor/destructor attributes do not execute on AArch64
- SIGRTMIN does not induce migration
- struct stat wrong value HOT 4
- Wrong value when passing "struct stat" as a parameter to a function
- Stack transform timing utility architecture mismatch HOT 2
- Changing musl Makefile to use -O0 explicitly causes arm64 STLXR -> LDAXR pair to fail on real machines
- ./install_compiler.py error on Ubuntu 20.04 HOT 2
- libevent configure failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from popcorn-compiler.