S12 content of a lib file

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S12 content of a lib file

ソリューションへジャンプ
2,028件の閲覧回数
francoisdugue
Contributor III

Hi,

I'm using S32LISA V11.1 to generate lib file from a project.

I'm doing the same on another machine, and i try to compare them.

I understand the header where times are written... but can anybody explain me the end on the generated lib file?

I saw the list of used object files but there are some data/symbols between them that i don't understand...

Thanks in advance for your help.

0 件の賞賛
1 解決策
2,009件の閲覧回数
ErichStyger
Senior Contributor V

All what you rely on is the code. It must be the same if using the same build tools with the same sources. Everything else (e.g. .a, .o, .elf, etc) can be subject of differences, as they include timestamps and possibly information about the host.

It could be that your build tools are using some environment variables too.

元の投稿で解決策を見る

0 件の賞賛
8 返答(返信)
1,915件の閲覧回数
francoisdugue
Contributor III

Hi,

Thanks for all of these exchanges. They help me a lot.

0 件の賞賛
2,011件の閲覧回数
francoisdugue
Contributor III

Done, except header line (S0), the S19 or Sx content are identical.

I had made other tests using a third machine identical to mine : Everything is ok!

Let's synthesis:

  • Same Code
  • Same toolchain
  • Same build script
  • different windows (2 Win_10_Pro; 1 Win_Server_2019)

Generated .lib on both Win_10_Pro are identical, but the one generated on Win_Server_2019 is different.

In the .lib, the part related to object code is correct. Only header and placement/range reference are modified...

This let me think that the linker have not the same behavior depending on the environment...

Is there something special to know with windows server? Or maybe, it's never a guaranty that the linker keep the same behavior between machines... 

0 件の賞賛
2,010件の閲覧回数
ErichStyger
Senior Contributor V

All what you rely on is the code. It must be the same if using the same build tools with the same sources. Everything else (e.g. .a, .o, .elf, etc) can be subject of differences, as they include timestamps and possibly information about the host.

It could be that your build tools are using some environment variables too.

0 件の賞賛
2,016件の閲覧回数
ErichStyger
Senior Contributor V

I recommend you create a S19 file and compare the real content.

0 件の賞賛
2,017件の閲覧回数
francoisdugue
Contributor III

From the lst file :

Units and locations in library 'MYFILE_LIB_GEN_OUTPUT.lib'
Unit name                     size     from       to
FILE1.o                       46288     105    46393
FILE2.o                       10288   46393    56681
FILE3.o                       3560    56681    60241

EXPORTED OBJECTS
***
The list of exported objects from the files
***

The Size is not change. The *.o file are identical (checked using Beyond Compare)

The From/To are object placement values in memory.

They are shifted by 5 bytes between the 2 machines...

0 件の賞賛
2,021件の閲覧回数
francoisdugue
Contributor III

Hi, thank for your answer.

i mean my target is MC9S12ZVL... which use S12LISA toolchain.

My library is generated using 3 files. The 3 compiled objects are identical between both machine.

However, I found something by looking on generated lst file: Ranges!

There is a delta between objects ranges...

---

EDIT : The size is equal but the From/To values have changed

---

This is really surprising because there is no diff between toolchain versions, nor code etc...

The only delta is the machine...

0 件の賞賛
2,020件の閲覧回数
ErichStyger
Senior Contributor V

Can you share the details about what are the changes/differences?

0 件の賞賛
2,024件の閲覧回数
ErichStyger
Senior Contributor V

Not exactly what you mean with S12 (I'm not familiar with S32LISA, but I assume gcc/GNU toolchain?).

Your .lib file is most likely a normal archive built by ar (https://sourceware.org/binutils/docs/binutils/ar.html), so you can find information there.

0 件の賞賛