>
> Please take a look at the .debug_line info in your object file with
> "readelf -wl test.o". I expect you will see negative advances of line
> number, at the address where you see repeated source lines. This is
> normal. Compilers will emit code corresponding to a single line, at
> different
On Fri, Apr 08, 2016 at 06:25:23PM +0200, Albert Netymk wrote:
> test.c
> ```
> void my_fun(int *arr, int N)
> {
> int sum = 0;
> for (int i = 0; i < N; ++i) {
> sum += arr[i];
> }
> }
>
> int main(void)
> {
> return 0;
> }
> ```
> clang -c -g test.c ; objdump -S test.o > t
test.c
```
void my_fun(int *arr, int N)
{
int sum = 0;
for (int i = 0; i < N; ++i) {
sum += arr[i];
}
}
int main(void)
{
return 0;
}
```
clang -c -g test.c ; objdump -S test.o > test.s
`my_fun` appears twice in the disassembly code.
Excerpt of test.s:
```
void my_fun(int *